summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-06-18 21:03:30 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-06-18 21:03:30 (GMT)
commit23465486edeb6e9d76ae795d523bedbf4e665d64 (patch)
tree3831eaca941ba6521cd31463bfdcb8739805bb3a /test
parentd6f7fda058353212449fce012787d0d46d866f2f (diff)
downloadhdf5-23465486edeb6e9d76ae795d523bedbf4e665d64.zip
hdf5-23465486edeb6e9d76ae795d523bedbf4e665d64.tar.gz
hdf5-23465486edeb6e9d76ae795d523bedbf4e665d64.tar.bz2
[svn-r432] Changes since 19980617
---------------------- ./html/Datatypes.html ./src/H5T.c ./src/H5Tconv.c ./src/H5Tpkg.h ./src/H5Tpublic.h ./src/H5detect.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/external.c ./test/tattr.c ./test/th5s.c Organized the predefined data types. ./html/H5.intro.html NO MODIFICATIONS! This file is a mess (obviously generated from something else) so I skipped updating it! ./src/h5ls.c ./test/dsets.c ./test/tattr.c ./test/th5s.c Added extra argument to H5Sget_dims() calls per Albert's last update.
Diffstat (limited to 'test')
-rw-r--r--test/.distdep232
-rw-r--r--test/cmpd_dset.c44
-rw-r--r--test/dsets.c26
-rw-r--r--test/dtypes.c16
-rw-r--r--test/external.c12
-rw-r--r--test/tattr.c78
-rw-r--r--test/th5s.c67
7 files changed, 234 insertions, 241 deletions
diff --git a/test/.distdep b/test/.distdep
index b2dc049..17b11f1 100644
--- a/test/.distdep
+++ b/test/.distdep
@@ -4,30 +4,6 @@ testhdf5.o: \
../src/H5private.h \
../src/H5public.h \
../src/H5config.h
-tattr.o: \
- tattr.c \
- testhdf5.h \
- ../src/H5private.h \
- ../src/H5public.h \
- ../src/H5config.h \
- ../src/H5Eprivate.h \
- ../src/H5Epublic.h \
- ../src/H5Ipublic.h \
- ../src/hdf5.h \
- ../src/H5Apublic.h \
- ../src/H5ACpublic.h \
- ../src/H5Bpublic.h \
- ../src/H5Dpublic.h \
- ../src/H5Fpublic.h \
- ../src/H5Gpublic.h \
- ../src/H5HGpublic.h \
- ../src/H5HLpublic.h \
- ../src/H5MFpublic.h \
- ../src/H5MMpublic.h \
- ../src/H5Opublic.h \
- ../src/H5Ppublic.h \
- ../src/H5Zpublic.h \
- ../src/H5Spublic.h
tfile.o: \
tfile.c \
testhdf5.h \
@@ -130,55 +106,6 @@ tstab.o: \
../src/H5Tpublic.h \
../src/H5Sprivate.h \
../src/H5Spublic.h
-th5s.o: \
- th5s.c \
- testhdf5.h \
- ../src/H5private.h \
- ../src/H5public.h \
- ../src/H5config.h \
- ../src/H5Eprivate.h \
- ../src/H5Epublic.h \
- ../src/H5Ipublic.h \
- ../src/H5Bprivate.h \
- ../src/H5Bpublic.h \
- ../src/H5Fprivate.h \
- ../src/H5Fpublic.h \
- ../src/H5Dpublic.h \
- ../src/H5Sprivate.h \
- ../src/H5Spublic.h \
- ../src/H5Gprivate.h \
- ../src/H5Gpublic.h \
- ../src/H5Oprivate.h \
- ../src/H5Opublic.h \
- ../src/H5HGprivate.h \
- ../src/H5HGpublic.h \
- ../src/H5Tprivate.h \
- ../src/H5Tpublic.h \
- ../src/H5Zprivate.h \
- ../src/H5Zpublic.h \
- ../src/H5Pprivate.h
-dtypes.o: \
- dtypes.c \
- ../src/hdf5.h \
- ../src/H5public.h \
- ../src/H5config.h \
- ../src/H5Ipublic.h \
- ../src/H5Apublic.h \
- ../src/H5ACpublic.h \
- ../src/H5Bpublic.h \
- ../src/H5Dpublic.h \
- ../src/H5Epublic.h \
- ../src/H5Fpublic.h \
- ../src/H5Gpublic.h \
- ../src/H5HGpublic.h \
- ../src/H5HLpublic.h \
- ../src/H5MFpublic.h \
- ../src/H5MMpublic.h \
- ../src/H5Opublic.h \
- ../src/H5Ppublic.h \
- ../src/H5Zpublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
hyperslab.o: \
hyperslab.c \
../src/H5private.h \
@@ -210,8 +137,29 @@ istore.o: \
../src/H5Tprivate.h \
../src/H5Tpublic.h \
../src/H5Sprivate.h
-dsets.o: \
- dsets.c \
+extend.o: \
+ extend.c \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MFpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Spublic.h
+iopipe.o: \
+ iopipe.c \
../src/hdf5.h \
../src/H5public.h \
../src/H5config.h \
@@ -232,8 +180,25 @@ dsets.o: \
../src/H5Zpublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
-cmpd_dset.o: \
- cmpd_dset.c \
+gheap.o: \
+ gheap.c \
+ ../src/H5private.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5Eprivate.h \
+ ../src/H5Epublic.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Fpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Gprivate.h \
+ ../src/H5Gpublic.h \
+ ../src/H5Bprivate.h \
+ ../src/H5Bpublic.h \
+ ../src/H5HGprivate.h \
+ ../src/H5HGpublic.h
+shtype.o: \
+ shtype.c \
../src/hdf5.h \
../src/H5public.h \
../src/H5config.h \
@@ -253,8 +218,8 @@ cmpd_dset.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Spublic.h
-extend.o: \
- extend.c \
+big.o: \
+ big.c \
../src/hdf5.h \
../src/H5public.h \
../src/H5config.h \
@@ -273,9 +238,11 @@ extend.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Spublic.h
-external.o: \
- external.c \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5private.h
+links.o: \
+ links.c \
../src/hdf5.h \
../src/H5public.h \
../src/H5config.h \
@@ -296,8 +263,8 @@ external.o: \
../src/H5Zpublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
-iopipe.o: \
- iopipe.c \
+chunk.o: \
+ chunk.c \
../src/hdf5.h \
../src/H5public.h \
../src/H5config.h \
@@ -318,34 +285,37 @@ iopipe.o: \
../src/H5Zpublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
-gheap.o: \
- gheap.c \
- ../src/H5private.h \
+bittests.o: \
+ bittests.c \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5HGpublic.h \
../src/H5public.h \
../src/H5config.h \
- ../src/H5Eprivate.h \
- ../src/H5Epublic.h \
- ../src/H5Ipublic.h \
../src/H5Fprivate.h \
../src/H5Fpublic.h \
+ ../src/H5Ipublic.h \
+ ../src/H5private.h \
../src/H5Dpublic.h \
+ ../src/H5Tprivate.h \
+ ../src/H5Tpublic.h \
../src/H5Gprivate.h \
../src/H5Gpublic.h \
- ../src/H5Bprivate.h \
- ../src/H5Bpublic.h \
- ../src/H5HGprivate.h \
- ../src/H5HGpublic.h
-shtype.o: \
- shtype.c \
- ../src/hdf5.h \
+ ../src/H5Bprivate.h
+tattr.o: \
+ tattr.c \
+ testhdf5.h \
+ ../src/H5private.h \
../src/H5public.h \
../src/H5config.h \
+ ../src/H5Eprivate.h \
+ ../src/H5Epublic.h \
../src/H5Ipublic.h \
+ ../src/hdf5.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
../src/H5Bpublic.h \
../src/H5Dpublic.h \
- ../src/H5Epublic.h \
../src/H5Fpublic.h \
../src/H5Gpublic.h \
../src/H5HGpublic.h \
@@ -356,8 +326,8 @@ shtype.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Spublic.h
-big.o: \
- big.c \
+dtypes.o: \
+ dtypes.c \
../src/hdf5.h \
../src/H5public.h \
../src/H5config.h \
@@ -377,10 +347,9 @@ big.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Spublic.h \
- ../src/H5Tpublic.h \
- ../src/H5private.h
-links.o: \
- links.c \
+ ../src/H5Tpublic.h
+dsets.o: \
+ dsets.c \
../src/hdf5.h \
../src/H5public.h \
../src/H5config.h \
@@ -401,8 +370,29 @@ links.o: \
../src/H5Zpublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
-chunk.o: \
- chunk.c \
+cmpd_dset.o: \
+ cmpd_dset.c \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MFpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Spublic.h
+external.o: \
+ external.c \
../src/hdf5.h \
../src/H5public.h \
../src/H5config.h \
@@ -423,20 +413,30 @@ chunk.o: \
../src/H5Zpublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
-bittests.o: \
- bittests.c \
- ../src/H5Tpkg.h \
- ../src/H5HGprivate.h \
- ../src/H5HGpublic.h \
+th5s.o: \
+ th5s.c \
+ testhdf5.h \
+ ../src/H5private.h \
../src/H5public.h \
../src/H5config.h \
+ ../src/H5Eprivate.h \
+ ../src/H5Epublic.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Bprivate.h \
+ ../src/H5Bpublic.h \
../src/H5Fprivate.h \
../src/H5Fpublic.h \
- ../src/H5Ipublic.h \
- ../src/H5private.h \
../src/H5Dpublic.h \
- ../src/H5Tprivate.h \
- ../src/H5Tpublic.h \
+ ../src/H5Sprivate.h \
+ ../src/H5Spublic.h \
../src/H5Gprivate.h \
../src/H5Gpublic.h \
- ../src/H5Bprivate.h
+ ../src/H5Oprivate.h \
+ ../src/H5Opublic.h \
+ ../src/H5HGprivate.h \
+ ../src/H5HGpublic.h \
+ ../src/H5Tprivate.h \
+ ../src/H5Tpublic.h \
+ ../src/H5Zprivate.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Pprivate.h
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 1ccbe85..694ce3d 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -189,11 +189,11 @@ STEP 1: Initialize dataset `s1' and store it on disk in native order.\n");
/* Create the memory data type */
s1_tid = H5Tcreate (H5T_COMPOUND, sizeof(s1_t));
- H5Tinsert (s1_tid, "a", HPOFFSET(s1,a), H5T_NATIVE_INT);
- H5Tinsert (s1_tid, "b", HPOFFSET(s1,b), H5T_NATIVE_INT);
- H5Tinsert (s1_tid, "c", HPOFFSET(s1,c), H5T_NATIVE_INT);
- H5Tinsert (s1_tid, "d", HPOFFSET(s1,d), H5T_NATIVE_INT);
- H5Tinsert (s1_tid, "e", HPOFFSET(s1,e), H5T_NATIVE_INT);
+ H5Tinsert (s1_tid, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT);
+ H5Tinsert (s1_tid, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT);
+ H5Tinsert (s1_tid, "c", HOFFSET(s1_t,c), H5T_NATIVE_INT);
+ H5Tinsert (s1_tid, "d", HOFFSET(s1_t,d), H5T_NATIVE_INT);
+ H5Tinsert (s1_tid, "e", HOFFSET(s1_t,e), H5T_NATIVE_INT);
assert (s1_tid>=0);
/* Create the dataset */
@@ -218,11 +218,11 @@ STEP 2: Read the dataset from disk into a new memory buffer which has the\n\
/* Create a data type for s2 */
s2_tid = H5Tcreate (H5T_COMPOUND, sizeof(s2_t));
- H5Tinsert (s2_tid, "a", HPOFFSET(s2,a), H5T_NATIVE_INT);
- H5Tinsert (s2_tid, "b", HPOFFSET(s2,b), H5T_NATIVE_INT);
- H5Tinsert (s2_tid, "c", HPOFFSET(s2,c), H5T_NATIVE_INT);
- H5Tinsert (s2_tid, "d", HPOFFSET(s2,d), H5T_NATIVE_INT);
- H5Tinsert (s2_tid, "e", HPOFFSET(s2,e), H5T_NATIVE_INT);
+ H5Tinsert (s2_tid, "a", HOFFSET(s2_t,a), H5T_NATIVE_INT);
+ H5Tinsert (s2_tid, "b", HOFFSET(s2_t,b), H5T_NATIVE_INT);
+ H5Tinsert (s2_tid, "c", HOFFSET(s2_t,c), H5T_NATIVE_INT);
+ H5Tinsert (s2_tid, "d", HOFFSET(s2_t,d), H5T_NATIVE_INT);
+ H5Tinsert (s2_tid, "e", HOFFSET(s2_t,e), H5T_NATIVE_INT);
assert (s2_tid>=0);
/* Read the data */
@@ -250,11 +250,11 @@ STEP 3: Read the dataset again with members in a different order.\n");
/* Create a data type for s3 */
s3_tid = H5Tcreate (H5T_COMPOUND, sizeof(s3_t));
- H5Tinsert (s3_tid, "a", HPOFFSET(s3,a), H5T_NATIVE_INT);
- H5Tinsert (s3_tid, "b", HPOFFSET(s3,b), H5T_NATIVE_INT);
- H5Tinsert (s3_tid, "c", HPOFFSET(s3,c), H5T_NATIVE_INT);
- H5Tinsert (s3_tid, "d", HPOFFSET(s3,d), H5T_NATIVE_INT);
- H5Tinsert (s3_tid, "e", HPOFFSET(s3,e), H5T_NATIVE_INT);
+ H5Tinsert (s3_tid, "a", HOFFSET(s3_t,a), H5T_NATIVE_INT);
+ H5Tinsert (s3_tid, "b", HOFFSET(s3_t,b), H5T_NATIVE_INT);
+ H5Tinsert (s3_tid, "c", HOFFSET(s3_t,c), H5T_NATIVE_INT);
+ H5Tinsert (s3_tid, "d", HOFFSET(s3_t,d), H5T_NATIVE_INT);
+ H5Tinsert (s3_tid, "e", HOFFSET(s3_t,e), H5T_NATIVE_INT);
assert (s3_tid>=0);
/* Read the data */
@@ -281,8 +281,8 @@ STEP 4: Read a subset of the members.\n");
/* Create a datatype for s4 */
s4_tid = H5Tcreate (H5T_COMPOUND, sizeof(s4_t));
- H5Tinsert (s4_tid, "b", HPOFFSET(s4,b), H5T_NATIVE_INT);
- H5Tinsert (s4_tid, "d", HPOFFSET(s4,d), H5T_NATIVE_INT);
+ H5Tinsert (s4_tid, "b", HOFFSET(s4_t,b), H5T_NATIVE_INT);
+ H5Tinsert (s4_tid, "d", HOFFSET(s4_t,d), H5T_NATIVE_INT);
assert (s4_tid>=0);
/* Read the data */
@@ -314,11 +314,11 @@ STEP 5: Read members into a superset which is partially initialized.\n");
/* Create a data type for s5 */
s5_tid = H5Tcreate (H5T_COMPOUND, sizeof(s5_t));
- H5Tinsert (s5_tid, "a", HPOFFSET(s5,a), H5T_NATIVE_INT);
- H5Tinsert (s5_tid, "b", HPOFFSET(s5,b), H5T_NATIVE_INT);
- H5Tinsert (s5_tid, "c", HPOFFSET(s5,c), H5T_NATIVE_INT);
- H5Tinsert (s5_tid, "d", HPOFFSET(s5,d), H5T_NATIVE_INT);
- H5Tinsert (s5_tid, "e", HPOFFSET(s5,e), H5T_NATIVE_INT);
+ H5Tinsert (s5_tid, "a", HOFFSET(s5_t,a), H5T_NATIVE_INT);
+ H5Tinsert (s5_tid, "b", HOFFSET(s5_t,b), H5T_NATIVE_INT);
+ H5Tinsert (s5_tid, "c", HOFFSET(s5_t,c), H5T_NATIVE_INT);
+ H5Tinsert (s5_tid, "d", HOFFSET(s5_t,d), H5T_NATIVE_INT);
+ H5Tinsert (s5_tid, "e", HOFFSET(s5_t,e), H5T_NATIVE_INT);
assert (s5_tid>=0);
/* Read the data */
diff --git a/test/dsets.c b/test/dsets.c
index cc81319..a3c15df 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -291,7 +291,7 @@ test_tconv(hid_t file)
char *out=NULL, *in=NULL;
int i;
hsize_t dims[1];
- hid_t space, dataset, type;
+ hid_t space, dataset;
herr_t status;
out = malloc (4*1000000);
@@ -316,31 +316,18 @@ test_tconv(hid_t file)
assert(space >= 0);
/* Create the data set */
- dataset = H5Dcreate(file, DSET_TCONV_NAME, H5T_NATIVE_INT32, space,
+ dataset = H5Dcreate(file, DSET_TCONV_NAME, H5T_STD_I32LE, space,
H5P_DEFAULT);
assert(dataset >= 0);
/* Write the data to the dataset */
- status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL,
+ status = H5Dwrite(dataset, H5T_STD_I32LE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, out);
assert(status >= 0);
- /* Create a new type with the opposite byte order */
- type = H5Tcopy(H5T_NATIVE_INT32);
- switch (H5Tget_order(type)) {
- case H5T_ORDER_BE:
- H5Tset_order(type, H5T_ORDER_LE);
- break;
- case H5T_ORDER_LE:
- H5Tset_order(type, H5T_ORDER_BE);
- break;
- default:
- assert("funny byte order" && 0);
- break;
- }
-
/* Read data with byte order conversion */
- status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, in);
+ status = H5Dread(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, in);
assert(status >= 0);
/* Check */
@@ -352,7 +339,6 @@ test_tconv(hid_t file)
}
H5Dclose(dataset);
- H5Tclose(type);
free (out);
free (in);
@@ -716,7 +702,7 @@ test_multiopen (hid_t file)
/* Get the size from the second handle */
if ((space = H5Dget_space (dset2))<0) goto error;
- if (H5Sget_dims (space, tmp_size)<0) goto error;
+ if (H5Sget_dims (space, tmp_size, NULL)<0) goto error;
if (cur_size[0]!=tmp_size[0]) {
puts ("*FAILED*");
printf (" Got %d instead of %d!\n",
diff --git a/test/dtypes.c b/test/dtypes.c
index f60efd7..1bc58f5 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -534,7 +534,7 @@ test_conv_num (void)
/* (unsigned)0x80000000 -> (unsigned)0xffff */
byte[0] = byte[1] = byte[2] = 0;
byte[3] = 0x80;
- if (H5Tconvert (H5T_NATIVE_UINT32, H5T_NATIVE_UINT16, 1, byte, NULL)<0) {
+ if (H5Tconvert (H5T_STD_U32LE, H5T_STD_U16LE, 1, byte, NULL)<0) {
goto error;
}
if (byte[0]!=0xff || byte[1]!=0xff) {
@@ -545,7 +545,7 @@ test_conv_num (void)
/* (unsigned)0xffffffff -> (signed)0x7fff */
byte[0] = byte[1] = byte[2] = byte[3] = 0xff;
- if (H5Tconvert (H5T_NATIVE_UINT32, H5T_NATIVE_INT16, 1, byte, NULL)<0) {
+ if (H5Tconvert (H5T_STD_U32LE, H5T_STD_I16LE, 1, byte, NULL)<0) {
goto error;
}
if (byte[0]!=0xff || byte[1]!=0x7f) {
@@ -556,7 +556,7 @@ test_conv_num (void)
/* (signed)0xffffffff -> (unsigned)0x0000 */
byte[0] = byte[1] = byte[2] = byte[3] = 0xff;
- if (H5Tconvert (H5T_NATIVE_INT32, H5T_NATIVE_UINT16, 1, byte, NULL)<0) {
+ if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, 1, byte, NULL)<0) {
goto error;
}
if (byte[0]!=0x00 || byte[1]!=0x00) {
@@ -568,7 +568,7 @@ test_conv_num (void)
/* (signed)0x7fffffff -> (unsigned)0xffff */
byte[0] = byte[1] = byte[2] = 0xff;
byte[3] = 0x7f;
- if (H5Tconvert (H5T_NATIVE_INT32, H5T_NATIVE_UINT16, 1, byte, NULL)<0) {
+ if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, 1, byte, NULL)<0) {
goto error;
}
if (byte[0]!=0xff || byte[1]!=0xff) {
@@ -580,7 +580,7 @@ test_conv_num (void)
/* (signed)0x7fffffff -> (signed)0x7fff */
byte[0] = byte[1] = byte[2] = 0xff;
byte[3] = 0x7f;
- if (H5Tconvert (H5T_NATIVE_INT32, H5T_NATIVE_INT16, 1, byte, NULL)<0) {
+ if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, 1, byte, NULL)<0) {
goto error;
}
if (byte[0]!=0xff || byte[1]!=0x7f) {
@@ -592,7 +592,7 @@ test_conv_num (void)
/* (signed)0xbfffffff -> (signed)0x8000 */
byte[0] = byte[1] = byte[2] = 0xff;
byte[3] = 0xbf;
- if (H5Tconvert (H5T_NATIVE_INT32, H5T_NATIVE_INT16, 1, byte, NULL)<0) {
+ if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, 1, byte, NULL)<0) {
goto error;
}
if (byte[0]!=0x00 || byte[1]!=0x80) {
@@ -622,9 +622,9 @@ test_conv_num (void)
memcpy (saved, buf, nelmts*sizeof(int));
/* Convert there and back */
- if (H5Tconvert (H5T_NATIVE_INT, H5T_IEEE_S64LE, nelmts, buf,
+ if (H5Tconvert (H5T_NATIVE_INT, H5T_STD_I64LE, nelmts, buf,
NULL)<0) goto error;
- if (H5Tconvert (H5T_IEEE_S64LE, H5T_NATIVE_INT, nelmts, buf,
+ if (H5Tconvert (H5T_STD_I64LE, H5T_NATIVE_INT, nelmts, buf,
NULL)<0) goto error;
/* Check results */
diff --git a/test/external.c b/test/external.c
index 2c8e8a7..d552ac0 100644
--- a/test/external.c
+++ b/test/external.c
@@ -157,7 +157,7 @@ test_1 (void)
assert (space>=0);
/* Create the dataset, the `dset1' name is used later too */
- dset = H5Dcreate (file, "dset1", H5T_NATIVE_INT32, space, plist);
+ dset = H5Dcreate (file, "dset1", H5T_NATIVE_INT, space, plist);
if (dset<0) break;
H5Dclose (dset);
puts (" PASSED");
@@ -182,7 +182,7 @@ test_1 (void)
H5Eget_auto (&func, &client_data);
H5Eset_auto (NULL, NULL);
- dset = H5Dcreate (file, "dset2", H5T_NATIVE_INT32, space, plist);
+ dset = H5Dcreate (file, "dset2", H5T_NATIVE_INT, space, plist);
H5Eset_auto (func, client_data);
if (dset>=0) {
@@ -214,7 +214,7 @@ test_1 (void)
space = H5Screate_simple (1, size, max_size);
assert (space>=0);
- dset = H5Dcreate (file, "dset3", H5T_NATIVE_INT32, space, plist);
+ dset = H5Dcreate (file, "dset3", H5T_NATIVE_INT, space, plist);
if (dset<0) break;
H5Dclose (dset);
puts (" PASSED");
@@ -243,7 +243,7 @@ test_1 (void)
H5Eget_auto (&func, &client_data);
H5Eset_auto (NULL, NULL);
- dset = H5Dcreate (file, "dset4", H5T_NATIVE_INT32, space, plist);
+ dset = H5Dcreate (file, "dset4", H5T_NATIVE_INT, space, plist);
H5Eset_auto (func, client_data);
if (dset>=0) {
@@ -275,7 +275,7 @@ test_1 (void)
assert (space>=0);
/* Create the dataset, the `dset5' name is used later too */
- dset = H5Dcreate (file, "dset5", H5T_NATIVE_INT32, space, plist);
+ dset = H5Dcreate (file, "dset5", H5T_NATIVE_INT, space, plist);
if (dset<0) break;
H5Dclose (dset);
puts (" PASSED");
@@ -399,7 +399,7 @@ test_1 (void)
space = H5Screate_simple (1, size, max_size);
assert (space>=0);
- dset = H5Dcreate (file, "dset6", H5T_NATIVE_INT32, space, plist);
+ dset = H5Dcreate (file, "dset6", H5T_NATIVE_INT, space, plist);
if (dset<0) break;
H5Dclose (dset);
puts (" PASSED");
diff --git a/test/tattr.c b/test/tattr.c
index 1eae9b5..36dbdcf 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -46,13 +46,13 @@ static char RcsId[] = "$Revision$";
#define ATTR1_NAME "Attr1"
#define ATTR1_RANK 1
#define ATTR1_DIM1 3
-int32 attr_data1[ATTR1_DIM1]={512,-234,98123}; /* Test data for 1st attribute */
+int attr_data1[ATTR1_DIM1]={512,-234,98123}; /* Test data for 1st attribute */
#define ATTR2_NAME "Attr2"
#define ATTR2_RANK 2
#define ATTR2_DIM1 2
#define ATTR2_DIM2 2
-int32 attr_data2[ATTR2_DIM1][ATTR2_DIM2]={{7614,-416},{197814,-3}}; /* Test data for 2nd attribute */
+int attr_data2[ATTR2_DIM1][ATTR2_DIM2]={{7614,-416},{197814,-3}}; /* Test data for 2nd attribute */
#define ATTR3_NAME "Attr3"
#define ATTR3_RANK 3
@@ -72,7 +72,7 @@ size_t attr4_field1_off=0;
size_t attr4_field2_off=0;
size_t attr4_field3_off=0;
struct attr4_struct {
- int32 i;
+ int i;
double d;
char c;
} attr_data4[ATTR4_DIM1][ATTR4_DIM2]={{{3,-26.1,'d'},{-100000, 0.123,'3'}},
@@ -115,26 +115,26 @@ test_attr_basic_write(void)
CHECK(sid1, FAIL, "H5Screate_simple");
/* Create a dataset */
- dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UINT8,sid1,H5P_DEFAULT);
+ dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UCHAR,sid1,H5P_DEFAULT);
/* Create dataspace for attribute */
sid2 = H5Screate_simple(ATTR1_RANK, dims2, NULL);
CHECK(sid2, FAIL, "H5Screate_simple");
/* Try to create an attribute on the file (should fail) */
- ret=H5Acreate(fid1,ATTR1_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ ret=H5Acreate(fid1,ATTR1_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate");
/* Create an attribute for the dataset */
- attr=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ attr=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ ret=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate");
/* Write attribute information */
- ret=H5Awrite(attr,H5T_NATIVE_INT32,attr_data1);
+ ret=H5Awrite(attr,H5T_NATIVE_INT,attr_data1);
CHECK(ret, FAIL, "H5Awrite");
/* Close attribute */
@@ -159,15 +159,15 @@ test_attr_basic_write(void)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create an attribute for the group */
- attr=H5Acreate(group,ATTR2_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ attr=H5Acreate(group,ATTR2_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(group,ATTR2_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ ret=H5Acreate(group,ATTR2_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate");
/* Write attribute information */
- ret=H5Awrite(attr,H5T_NATIVE_INT32,attr_data2);
+ ret=H5Awrite(attr,H5T_NATIVE_INT,attr_data2);
CHECK(ret, FAIL, "H5Awrite");
/* Close attribute */
@@ -199,8 +199,8 @@ test_attr_basic_read(void)
hid_t dataset; /* Dataset ID */
hid_t group; /* Group ID */
hid_t attr; /* Attribute ID */
- int32 read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
- int32 read_data2[ATTR2_DIM1][ATTR2_DIM2]={{0}}; /* Buffer for reading 2nd attribute */
+ int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
+ int read_data2[ATTR2_DIM1][ATTR2_DIM2]={{0}}; /* Buffer for reading 2nd attribute */
int i,j;
herr_t ret; /* Generic return value */
@@ -224,7 +224,7 @@ test_attr_basic_read(void)
CHECK(attr, FAIL, "H5Aopen_name");
/* Read attribute information */
- ret=H5Aread(attr,H5T_NATIVE_INT32,read_data1);
+ ret=H5Aread(attr,H5T_NATIVE_INT,read_data1);
CHECK(ret, FAIL, "H5Aread");
/* Verify values read in */
@@ -253,7 +253,7 @@ test_attr_basic_read(void)
CHECK(attr, FAIL, "H5Aopen_name");
/* Read attribute information */
- ret=H5Aread(attr,H5T_NATIVE_INT32,read_data2);
+ ret=H5Aread(attr,H5T_NATIVE_INT,read_data2);
CHECK(ret, FAIL, "H5Aread");
/* Verify values read in */
@@ -307,7 +307,7 @@ test_attr_compound_write(void)
CHECK(sid1, FAIL, "H5Screate_simple");
/* Create a dataset */
- dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UINT8,sid1,H5P_DEFAULT);
+ dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UCHAR,sid1,H5P_DEFAULT);
/* Close dataset's dataspace */
ret = H5Sclose(sid1);
@@ -317,7 +317,7 @@ test_attr_compound_write(void)
tid1 = H5Tcreate (H5T_COMPOUND, sizeof(struct attr4_struct));
CHECK(tid1, FAIL, "H5Tcreate");
attr4_field1_off=HOFFSET(struct attr4_struct, i);
- ret = H5Tinsert(tid1, ATTR4_FIELDNAME1, attr4_field1_off, H5T_NATIVE_INT32);
+ ret = H5Tinsert(tid1, ATTR4_FIELDNAME1, attr4_field1_off, H5T_NATIVE_INT);
CHECK(ret, FAIL, "H5Tinsert");
attr4_field2_off=HOFFSET(struct attr4_struct, d);
ret = H5Tinsert(tid1, ATTR4_FIELDNAME2, attr4_field2_off, H5T_NATIVE_DOUBLE);
@@ -414,7 +414,7 @@ test_attr_compound_read(void)
CHECK(space, FAIL, "H5Aget_space");
rank=H5Sget_ndims(space);
VERIFY(rank, ATTR4_RANK, "H5Sget_ndims");
- ret=H5Sget_dims(space,dims);
+ ret=H5Sget_dims(space,dims, NULL);
CHECK(ret, FAIL, "H5Sget_dims");
if(dims[0]!=ATTR4_DIM1) {
printf("attribute dimensions different: dims[0]=%d, should be %d\n",(int)dims[0],ATTR4_DIM1);
@@ -456,9 +456,9 @@ test_attr_compound_read(void)
class=H5Tget_class(field);
VERIFY(class, H5T_INTEGER, "H5Tget_class");
order=H5Tget_order(field);
- VERIFY(order, H5Tget_order(H5T_NATIVE_INT32), "H5Tget_order");
+ VERIFY(order, H5Tget_order(H5T_NATIVE_INT), "H5Tget_order");
size=H5Tget_size(field);
- VERIFY(size, H5Tget_size(H5T_NATIVE_INT32), "H5Tget_size");
+ VERIFY(size, H5Tget_size(H5T_NATIVE_INT), "H5Tget_size");
H5Tclose(field);
field=H5Tget_member_type(type,1);
CHECK(field, FAIL, "H5Tget_member_type");
@@ -545,7 +545,7 @@ test_attr_scalar_write(void)
CHECK(sid1, FAIL, "H5Screate_simple");
/* Create a dataset */
- dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UINT8,sid1,H5P_DEFAULT);
+ dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UCHAR,sid1,H5P_DEFAULT);
/* Create dataspace for attribute */
sid2 = H5Screate_simple(ATTR5_RANK, NULL, NULL);
@@ -662,7 +662,7 @@ test_attr_mult_write(void)
CHECK(sid1, FAIL, "H5Screate_simple");
/* Create a dataset */
- dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UINT8,sid1,H5P_DEFAULT);
+ dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UCHAR,sid1,H5P_DEFAULT);
/* Close dataset's dataspace */
ret = H5Sclose(sid1);
@@ -673,15 +673,15 @@ test_attr_mult_write(void)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create 1st attribute for the dataset */
- attr=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ attr=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ ret=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate");
/* Write 1st attribute data */
- ret=H5Awrite(attr,H5T_NATIVE_INT32,attr_data1);
+ ret=H5Awrite(attr,H5T_NATIVE_INT,attr_data1);
CHECK(ret, FAIL, "H5Awrite");
/* Close 1st attribute */
@@ -697,15 +697,15 @@ test_attr_mult_write(void)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create 2nd attribute for the dataset */
- attr=H5Acreate(dataset,ATTR2_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ attr=H5Acreate(dataset,ATTR2_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR2_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ ret=H5Acreate(dataset,ATTR2_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate");
/* Write 2nd attribute information */
- ret=H5Awrite(attr,H5T_NATIVE_INT32,attr_data2);
+ ret=H5Awrite(attr,H5T_NATIVE_INT,attr_data2);
CHECK(ret, FAIL, "H5Awrite");
/* Close 2nd attribute */
@@ -769,8 +769,8 @@ test_attr_mult_read(void)
H5T_class_t class; /* Attribute datatype class */
H5T_order_t order; /* Attribute datatype order */
size_t size; /* Attribute datatype size as stored in file */
- int32 read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
- int32 read_data2[ATTR2_DIM1][ATTR2_DIM2]={{0}}; /* Buffer for reading 2nd attribute */
+ int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
+ int read_data2[ATTR2_DIM1][ATTR2_DIM2]={{0}}; /* Buffer for reading 2nd attribute */
double read_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3]={{{0}}}; /* Buffer for reading 3rd attribute */
int i,j,k;
size_t name_len; /* Length of attribute name */
@@ -799,7 +799,7 @@ test_attr_mult_read(void)
CHECK(space, FAIL, "H5Aget_space");
rank=H5Sget_ndims(space);
VERIFY(rank, ATTR1_RANK, "H5Sget_ndims");
- ret=H5Sget_dims(space,dims);
+ ret=H5Sget_dims(space,dims, NULL);
CHECK(ret, FAIL, "H5Sget_dims");
if(dims[0]!=ATTR1_DIM1) {
printf("attribute dimensions different: dims[0]=%d, should be %d\n",(int)dims[0],ATTR1_DIM1);
@@ -813,13 +813,13 @@ test_attr_mult_read(void)
class=H5Tget_class(type);
VERIFY(class, H5T_INTEGER, "H5Tget_class");
order=H5Tget_order(type);
- VERIFY(order, H5Tget_order(H5T_NATIVE_INT32), "H5Tget_order");
+ VERIFY(order, H5Tget_order(H5T_NATIVE_INT), "H5Tget_order");
size=H5Tget_size(type);
- VERIFY(size, H5Tget_size(H5T_NATIVE_INT32), "H5Tget_size");
+ VERIFY(size, H5Tget_size(H5T_NATIVE_INT), "H5Tget_size");
H5Tclose(type);
/* Read attribute information */
- ret=H5Aread(attr,H5T_NATIVE_INT32,read_data1);
+ ret=H5Aread(attr,H5T_NATIVE_INT,read_data1);
CHECK(ret, FAIL, "H5Aread");
/* Verify values read in */
@@ -860,7 +860,7 @@ test_attr_mult_read(void)
CHECK(space, FAIL, "H5Aget_space");
rank=H5Sget_ndims(space);
VERIFY(rank, ATTR2_RANK, "H5Sget_ndims");
- ret=H5Sget_dims(space,dims);
+ ret=H5Sget_dims(space,dims, NULL);
CHECK(ret, FAIL, "H5Sget_dims");
if(dims[0]!=ATTR2_DIM1) {
printf("attribute dimensions different: dims[0]=%d, should be %d\n",(int)dims[0],ATTR2_DIM1);
@@ -878,13 +878,13 @@ test_attr_mult_read(void)
class=H5Tget_class(type);
VERIFY(class, H5T_INTEGER, "H5Tget_class");
order=H5Tget_order(type);
- VERIFY(order, H5Tget_order(H5T_NATIVE_INT32), "H5Tget_order");
+ VERIFY(order, H5Tget_order(H5T_NATIVE_INT), "H5Tget_order");
size=H5Tget_size(type);
- VERIFY(size, H5Tget_size(H5T_NATIVE_INT32), "H5Tget_size");
+ VERIFY(size, H5Tget_size(H5T_NATIVE_INT), "H5Tget_size");
H5Tclose(type);
/* Read attribute information */
- ret=H5Aread(attr,H5T_NATIVE_INT32,read_data2);
+ ret=H5Aread(attr,H5T_NATIVE_INT,read_data2);
CHECK(ret, FAIL, "H5Aread");
/* Verify values read in */
@@ -926,7 +926,7 @@ test_attr_mult_read(void)
CHECK(space, FAIL, "H5Aget_space");
rank=H5Sget_ndims(space);
VERIFY(rank, ATTR3_RANK, "H5Sget_ndims");
- ret=H5Sget_dims(space,dims);
+ ret=H5Sget_dims(space,dims, NULL);
CHECK(ret, FAIL, "H5Sget_dims");
if(dims[0]!=ATTR3_DIM1) {
printf("attribute dimensions different: dims[0]=%d, should be %d\n",(int)dims[0],ATTR3_DIM1);
diff --git a/test/th5s.c b/test/th5s.c
index 8527652..3ac55db 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -51,7 +51,7 @@ static char RcsId[] = "$Revision$";
/* Scalar dataset with simple datatype */
#define SPACE3_NAME "Scalar1"
#define SPACE3_RANK 0
-uint32 space3_data=65;
+unsigned space3_data=65;
/* Scalar dataset with compound datatype */
#define SPACE4_NAME "Scalar2"
@@ -66,7 +66,7 @@ size_t space4_field3_off=0;
size_t space4_field4_off=0;
struct space4_struct {
char c1;
- uint32 u;
+ unsigned u;
float f;
char c2;
} space4_data={'v',987123,-3.14,'g'}; /* Test data for 4th dataspace */
@@ -81,7 +81,7 @@ test_h5s_basic(void)
{
hid_t fid1; /* HDF5 File IDs */
hid_t sid1, sid2; /* Dataspace ID */
- uint32 rank; /* Logical rank of dataspace */
+ unsigned rank; /* Logical rank of dataspace */
hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3,
SPACE2_DIM4};
@@ -107,24 +107,27 @@ test_h5s_basic(void)
CHECK(rank, UFAIL, "H5Sget_lrank");
VERIFY(rank, SPACE1_RANK, "H5Sget_lrank");
- ret = H5Sget_dims(sid1, tdims);
+ ret = H5Sget_dims(sid1, tdims, NULL);
CHECK(ret, FAIL, "H5Sget_ldims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(uint32)), 0, "H5Sget_ldims");
+ VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(unsigned)), 0,
+ "H5Sget_ldims");
sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL);
CHECK(sid2, FAIL, "H5Screate_simple");
n = H5Sget_npoints(sid2);
CHECK(n, UFAIL, "H5Snelem");
- VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4, "H5Snelem");
+ VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4,
+ "H5Snelem");
rank = H5Sget_ndims(sid2);
CHECK(rank, UFAIL, "H5Sget_lrank");
VERIFY(rank, SPACE2_RANK, "H5Sget_lrank");
- ret = H5Sget_dims(sid2, tdims);
+ ret = H5Sget_dims(sid2, tdims, NULL);
CHECK(ret, FAIL, "H5Sget_ldims");
- VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(uint32)), 0, "H5Sget_ldims");
+ VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(unsigned)), 0,
+ "H5Sget_ldims");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -148,7 +151,7 @@ test_h5s_scalar_write(void)
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
- uint32 rank; /* Logical rank of dataspace */
+ unsigned rank; /* Logical rank of dataspace */
hsize_t tdims[4]; /* Dimension array to test with */
size_t n; /* Number of dataspace elements */
herr_t ret; /* Generic return value */
@@ -172,14 +175,14 @@ test_h5s_scalar_write(void)
CHECK(rank, UFAIL, "H5Sget_lrank");
VERIFY(rank, SPACE3_RANK, "H5Sget_lrank");
- ret = H5Sget_dims(sid1, tdims);
+ ret = H5Sget_dims(sid1, tdims, NULL);
VERIFY(ret, 0, "H5Sget_dims");
/* Create a dataset */
- dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UINT32,sid1,H5P_DEFAULT);
+ dataset=H5Dcreate(fid1,"Dataset1",H5T_NATIVE_UINT,sid1,H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate");
- ret = H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, &space3_data);
+ ret = H5Dwrite(dataset, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &space3_data);
CHECK(ret, FAIL, "H5Dwrite");
/* Close Dataset */
@@ -205,11 +208,11 @@ test_h5s_scalar_read(void)
{
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- uint32 rank; /* Logical rank of dataspace */
+ hid_t sid1; /* Dataspace ID */
+ unsigned rank; /* Logical rank of dataspace */
hsize_t tdims[4]; /* Dimension array to test with */
size_t n; /* Number of dataspace elements */
- uint32 rdata; /* Scalar data read in */
+ unsigned rdata; /* Scalar data read in */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -234,10 +237,10 @@ test_h5s_scalar_read(void)
CHECK(rank, UFAIL, "H5Sget_lrank");
VERIFY(rank, SPACE3_RANK, "H5Sget_lrank");
- ret = H5Sget_dims(sid1, tdims);
+ ret = H5Sget_dims(sid1, tdims, NULL);
VERIFY(ret, 0, "H5Sget_dims");
- ret = H5Dread(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata);
+ ret = H5Dread(dataset, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata);
CHECK(ret, FAIL, "H5Dread");
VERIFY(rdata, space3_data, "H5Dread");
@@ -265,9 +268,9 @@ test_h5s_compound_scalar_write(void)
{
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
- hid_t tid1; /* Attribute datatype ID */
- hid_t sid1; /* Dataspace ID */
- uint32 rank; /* Logical rank of dataspace */
+ hid_t tid1; /* Attribute datatype ID */
+ hid_t sid1; /* Dataspace ID */
+ unsigned rank; /* Logical rank of dataspace */
hsize_t tdims[4]; /* Dimension array to test with */
size_t n; /* Number of dataspace elements */
herr_t ret; /* Generic return value */
@@ -283,16 +286,20 @@ test_h5s_compound_scalar_write(void)
tid1 = H5Tcreate (H5T_COMPOUND, sizeof(struct space4_struct));
CHECK(tid1, FAIL, "H5Tcreate");
space4_field1_off=HOFFSET(struct space4_struct, c1);
- ret = H5Tinsert(tid1, SPACE4_FIELDNAME1, space4_field1_off, H5T_NATIVE_CHAR);
+ ret = H5Tinsert(tid1, SPACE4_FIELDNAME1, space4_field1_off,
+ H5T_NATIVE_CHAR);
CHECK(ret, FAIL, "H5Tinsert");
space4_field2_off=HOFFSET(struct space4_struct, u);
- ret = H5Tinsert(tid1, SPACE4_FIELDNAME2, space4_field2_off, H5T_NATIVE_UINT32);
+ ret = H5Tinsert(tid1, SPACE4_FIELDNAME2, space4_field2_off,
+ H5T_NATIVE_UINT);
CHECK(ret, FAIL, "H5Tinsert");
space4_field3_off=HOFFSET(struct space4_struct, f);
- ret = H5Tinsert(tid1, SPACE4_FIELDNAME3, space4_field3_off, H5T_NATIVE_FLOAT);
+ ret = H5Tinsert(tid1, SPACE4_FIELDNAME3, space4_field3_off,
+ H5T_NATIVE_FLOAT);
CHECK(ret, FAIL, "H5Tinsert");
space4_field4_off=HOFFSET(struct space4_struct, c2);
- ret = H5Tinsert(tid1, SPACE4_FIELDNAME4, space4_field4_off, H5T_NATIVE_CHAR);
+ ret = H5Tinsert(tid1, SPACE4_FIELDNAME4, space4_field4_off,
+ H5T_NATIVE_CHAR);
CHECK(ret, FAIL, "H5Tinsert");
/* Create scalar dataspace */
@@ -307,7 +314,7 @@ test_h5s_compound_scalar_write(void)
CHECK(rank, UFAIL, "H5Sget_lrank");
VERIFY(rank, SPACE3_RANK, "H5Sget_lrank");
- ret = H5Sget_dims(sid1, tdims);
+ ret = H5Sget_dims(sid1, tdims, NULL);
VERIFY(ret, 0, "H5Sget_dims");
/* Create a dataset */
@@ -341,12 +348,12 @@ test_h5s_compound_scalar_read(void)
{
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t type; /* Datatype */
- uint32 rank; /* Logical rank of dataspace */
+ hid_t sid1; /* Dataspace ID */
+ hid_t type; /* Datatype */
+ unsigned rank; /* Logical rank of dataspace */
hsize_t tdims[4]; /* Dimension array to test with */
size_t n; /* Number of dataspace elements */
- struct space4_struct rdata; /* Scalar data read in */
+ struct space4_struct rdata; /* Scalar data read in */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -371,7 +378,7 @@ test_h5s_compound_scalar_read(void)
CHECK(rank, UFAIL, "H5Sget_lrank");
VERIFY(rank, SPACE3_RANK, "H5Sget_lrank");
- ret = H5Sget_dims(sid1, tdims);
+ ret = H5Sget_dims(sid1, tdims, NULL);
VERIFY(ret, 0, "H5Sget_dims");
type=H5Dget_type(dataset);