summaryrefslogtreecommitdiffstats
path: root/test/dsets.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-04-14 11:18:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-04-14 11:18:55 (GMT)
commite270be267beb1eedf046f46fafbc24f747748095 (patch)
tree4ebe8faa71a0692bd3a3f1ecf171a41a57e6ece2 /test/dsets.c
parent7e0748de229a4636f75809ed88ca93e7dababf81 (diff)
downloadhdf5-e270be267beb1eedf046f46fafbc24f747748095.zip
hdf5-e270be267beb1eedf046f46fafbc24f747748095.tar.gz
hdf5-e270be267beb1eedf046f46fafbc24f747748095.tar.bz2
[svn-r6662] Purpose:
Code cleanup Description: Switched some system/library calls to use wrappers. Platforms tested: FreeBSD 4.8 (sleipnir) w/C++ Linux 2.4 (burrwhite) w/FORTRAN Solaris 2.7 (arabica) w/FORTRAN IRIX64 6.5 (modi4) w/parallel & FORTRAN (h5committest not run due to my ongoing difficulties with C++ on burrwhite).
Diffstat (limited to 'test/dsets.c')
-rw-r--r--test/dsets.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 2fd5eb7..c18c24a 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -19,6 +19,7 @@
* Purpose: Tests the dataset interface (H5D)
*/
+#include <time.h>
#include "h5test.h"
/*
@@ -1091,7 +1092,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]/2; j++) {
- points[i][j] = rand ();
+ points[i][j] = HDrandom ();
}
}
if (H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, points)<0)
@@ -1197,7 +1198,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (i=0; i<hs_size[0]; i++) {
for (j=0; j<hs_size[1]; j++) {
- points[hs_offset[0]+i][hs_offset[1]+j] = rand ();
+ points[hs_offset[0]+i][hs_offset[1]+j] = HDrandom();
}
}
if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size,
@@ -1823,7 +1824,7 @@ test_onebyte_shuffle(hid_t file)
for (i= 0;i< 10; i++)
for (j = 0; j < 20; j++)
- orig_data[i][j] = rand();
+ orig_data[i][j] = HDrandom();
PASSED();
#else
@@ -2650,6 +2651,9 @@ main(void)
}
#endif
+ /* Set the random # seed */
+ HDsrandom((unsigned long)time(NULL));
+
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
goto error;