summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-06-21 15:26:00 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-06-21 15:26:00 (GMT)
commit71500ff8e1ad5ef1a84136207facb4de2dedddfa (patch)
tree6a98994967d3f8573c9dd7e39d094bd5f93e07e5 /tools
parentc858b613464a892b9446aadcfa56fe6ea03c8044 (diff)
downloadhdf5-71500ff8e1ad5ef1a84136207facb4de2dedddfa.zip
hdf5-71500ff8e1ad5ef1a84136207facb4de2dedddfa.tar.gz
hdf5-71500ff8e1ad5ef1a84136207facb4de2dedddfa.tar.bz2
[svn-r1367]
made a small change so that windows would stop complaining. the change involved using some type casting. the change was surrounded by a #define WIN32
Diffstat (limited to 'tools')
-rw-r--r--tools/testfiles/h5dumptst.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/tools/testfiles/h5dumptst.c b/tools/testfiles/h5dumptst.c
index 9dc078b..2ffcb3e 100644
--- a/tools/testfiles/h5dumptst.c
+++ b/tools/testfiles/h5dumptst.c
@@ -19,7 +19,8 @@
#define FILE12 "tmany.h5"
#define FILE13 "tstr.h5"
#define FILE14 "tstr2.h5"
-
+#define LENSTR 50
+#define LENSTR2 11
static void test_group(void) {
hid_t fid, group;
@@ -858,7 +859,11 @@ const int perm[4] = {0,1,2,3}; /* the 0'th and the 3'rd indices are permuted */
dset1[j].a[index[3]][index[2]][index[1]][index[0]] = i0+j;
dset1[j].b[index[3]][index[2]][index[1]][index[0]] = (double)(i0+j);
+#if WIN32
+ dset1[j].c[index[3]][index[2]][index[1]][index[0]] = (double)(i0+j+(signed __int64)sdim);
+#else
dset1[j].c[index[3]][index[2]][index[1]][index[0]] = (double)(i0+j+sdim);
+#endif
}
}
}
@@ -1069,23 +1074,22 @@ hid_t fid, group, attr, dataset, space, space2, mem_space, hyper_space, type;
hid_t fxdlenstr, fxdlenstr2, memtype;
hsize_t dims[1], size[1], start[1], stride[1], count[1], block[1];
-int lenstr = 50;
-int lenstr2 = 11;
+
int i, j;
int i0, i1, i2, i3;
-char buf[lenstr+10];
-char buf2[3*lenstr2];
+char buf[LENSTR+10];
+char buf2[3*LENSTR2];
hsize_t sdim, maxdim;
fid = H5Fcreate(FILE14, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
fxdlenstr = H5Tcopy(H5T_C_S1);
- H5Tset_size(fxdlenstr, lenstr);
+ H5Tset_size(fxdlenstr, LENSTR);
H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
H5Tset_strpad(fxdlenstr, H5T_STR_NULLTERM);
memtype = H5Tcopy(H5T_C_S1);
- H5Tset_size(memtype, lenstr);
+ H5Tset_size(memtype, LENSTR);
H5Tset_cset(memtype, H5T_CSET_ASCII);
H5Tset_strpad(memtype, H5T_STR_NULLTERM);
@@ -1104,16 +1108,16 @@ hsize_t sdim, maxdim;
/* add attributes to dset1 */
fxdlenstr2 = H5Tcopy(H5T_C_S1);
- H5Tset_size(fxdlenstr2, lenstr2);
+ H5Tset_size(fxdlenstr2, LENSTR2);
H5Tset_cset(fxdlenstr2, H5T_CSET_ASCII);
H5Tset_strpad(fxdlenstr2, H5T_STR_NULLTERM);
dims[0] = 3;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate (dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT);
- sprintf(&(buf2[0*lenstr2]), "0123456789");
- sprintf(&(buf2[1*lenstr2]), "abcdefghij");
- sprintf(&(buf2[2*lenstr2]), "ABCDEFGHIJ");
+ sprintf(&(buf2[0*LENSTR2]), "0123456789");
+ sprintf(&(buf2[1*LENSTR2]), "abcdefghij");
+ sprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ");
H5Awrite(attr, fxdlenstr2, buf2);
H5Sclose(space2);
H5Tclose(fxdlenstr2);
@@ -1149,7 +1153,7 @@ hsize_t sdim, maxdim;
H5Tclose(fxdlenstr);
fxdlenstr = H5Tcopy(H5T_C_S1);
- H5Tset_size(fxdlenstr, lenstr);
+ H5Tset_size(fxdlenstr, LENSTR);
H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
H5Tset_strpad(fxdlenstr, H5T_STR_NULLPAD);
@@ -1182,7 +1186,7 @@ hsize_t sdim, maxdim;
H5Tclose(fxdlenstr);
fxdlenstr = H5Tcopy(H5T_C_S1);
- H5Tset_size(fxdlenstr, lenstr);
+ H5Tset_size(fxdlenstr, LENSTR);
H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
H5Tset_strpad(fxdlenstr, H5T_STR_SPACEPAD);