diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-02-23 19:08:09 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-02-23 19:08:09 (GMT) |
commit | 0b4463911f951713d00b9c82f98773f147b6c73b (patch) | |
tree | c764d5d707278c88c709488aeb9046abafee69b4 /tools/h5repack/h5repacktst.c | |
parent | 9974e02bc07585de4fdfc1f0b2803a7370e37b4e (diff) | |
download | hdf5-0b4463911f951713d00b9c82f98773f147b6c73b.zip hdf5-0b4463911f951713d00b9c82f98773f147b6c73b.tar.gz hdf5-0b4463911f951713d00b9c82f98773f147b6c73b.tar.bz2 |
[svn-r21974] Update HSIZE_T print statements to use correct macro.
Fix some more HD prefix issues in tools.
Tested: local linux
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r-- | tools/h5repack/h5repacktst.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index d0974b6..156038c 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -170,15 +170,15 @@ int main (void) { pack_opt_t pack_options; diff_opt_t diff_options; - hsize_t fs_size = 0; /* free space section threshold */ - H5F_file_space_type_t fs_type = H5F_FILE_SPACE_DEFAULT; /* file space handling strategy */ + hsize_t fs_size = 0; /* free space section threshold */ + H5F_file_space_type_t fs_type = H5F_FILE_SPACE_DEFAULT; /* file space handling strategy */ #if defined (H5_HAVE_FILTER_SZIP) int szip_can_encode = 0; #endif /* initialize */ - memset(&diff_options, 0, sizeof (diff_opt_t)); - memset(&pack_options, 0, sizeof (pack_opt_t)); + HDmemset(&diff_options, 0, sizeof (diff_opt_t)); + HDmemset(&pack_options, 0, sizeof (pack_opt_t)); /* run tests */ puts("Testing h5repack:"); @@ -938,7 +938,7 @@ int main (void) #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { - /* fs_type = H5F_FILE_SPACE_AGGR_VFD; fs_size = 3 */ + /* fs_type = H5F_FILE_SPACE_AGGR_VFD; fs_size = 3 */ if (h5repack_init (&pack_options, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0) GOERROR; if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0) @@ -1255,7 +1255,7 @@ int main (void) && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) if (szip_can_encode) { - /* fs_type = H5F_FILE_SPACE_VFD; fs_size = 4 */ + /* fs_type = H5F_FILE_SPACE_VFD; fs_size = 4 */ if (h5repack_init (&pack_options, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options) < 0) @@ -2956,31 +2956,31 @@ out: * * Purpose: create datasets with contiguous and chunked layouts: * - * contig_small: < 1k, fixed dims datspace - * chunked_small_fixed: < 1k, fixed dims dataspace + * contig_small: < 1k, fixed dims datspace + * chunked_small_fixed: < 1k, fixed dims dataspace * *------------------------------------------------------------------------- */ -#define S_DIM1 4 -#define S_DIM2 10 -#define CONTIG_S "contig_small" -#define CHUNKED_S_FIX "chunked_small_fixed" +#define S_DIM1 4 +#define S_DIM2 10 +#define CONTIG_S "contig_small" +#define CHUNKED_S_FIX "chunked_small_fixed" static int make_layout2(hid_t loc_id) { - hid_t contig_dcpl = -1; /* dataset creation property list */ + hid_t contig_dcpl = -1; /* dataset creation property list */ hid_t chunked_dcpl = -1; /* dataset creation property list */ - int i, j, n; /* Local index variables */ - int ret_value = -1; /* Return value */ - hid_t s_sid = -1; /* dataspace ID */ + int i, j, n; /* Local index variables */ + int ret_value = -1; /* Return value */ + hid_t s_sid = -1; /* dataspace ID */ - hsize_t s_dims[RANK] = {S_DIM1,S_DIM2}; /* Dataspace (< 1 k) */ - hsize_t chunk_dims[RANK] = {S_DIM1/2, S_DIM2/2}; /* Dimension sizes for chunks */ + hsize_t s_dims[RANK] = {S_DIM1,S_DIM2}; /* Dataspace (< 1 k) */ + hsize_t chunk_dims[RANK] = {S_DIM1/2, S_DIM2/2}; /* Dimension sizes for chunks */ - int s_buf[S_DIM1][S_DIM2]; /* Temporary buffer */ + int s_buf[S_DIM1][S_DIM2]; /* Temporary buffer */ for(i = n = 0; i < S_DIM1; i++) { for (j = 0; j < S_DIM2; j++) { @@ -3130,7 +3130,7 @@ int make_big(hid_t loc_id) if (H5Dwrite (did,H5T_NATIVE_SCHAR,m_sid,f_sid,H5P_DEFAULT,buf) < 0) goto out; - free(buf); + HDfree(buf); buf=NULL; /* close */ @@ -3171,8 +3171,8 @@ int make_external(hid_t loc_id) hid_t sid=-1; hid_t dcpl; int buf[2]={1,2}; - hsize_t cur_size[1]; /* data space current size */ - hsize_t max_size[1]; /* data space maximum size */ + hsize_t cur_size[1]; /* data space current size */ + hsize_t max_size[1]; /* data space maximum size */ hsize_t size; cur_size[0] = max_size[0] = 2; @@ -3255,7 +3255,7 @@ make_userblock(void) /* Write userblock data */ nwritten = HDwrite(fd, ub, (size_t)USERBLOCK_SIZE); - assert(nwritten == USERBLOCK_SIZE); + HDassert(nwritten == USERBLOCK_SIZE); /* Close file */ HDclose(fd); @@ -3319,7 +3319,7 @@ verify_userblock( const char* filename) /* Read userblock data */ nread = HDread(fd, ub, (size_t)USERBLOCK_SIZE); - assert(nread == USERBLOCK_SIZE); + HDassert(nread == USERBLOCK_SIZE); /* Verify userblock data */ for(u = 0; u < USERBLOCK_SIZE; u++) @@ -3368,7 +3368,7 @@ make_userblock_file(void) /* write userblock data */ nwritten = HDwrite(fd, ub, (size_t)USERBLOCK_SIZE); - assert(nwritten == USERBLOCK_SIZE); + HDassert(nwritten == USERBLOCK_SIZE); /* close file */ HDclose(fd); @@ -3693,7 +3693,7 @@ int write_dset_in(hid_t loc_id, H5Dclose(did); H5Tclose(tid); H5Sclose(sid); - free( dbuf ); + HDfree( dbuf ); } /*------------------------------------------------------------------------- @@ -3728,7 +3728,7 @@ int write_dset_in(hid_t loc_id, if (make_diffs) { - memset(buf12, 'z', sizeof buf12); + HDmemset(buf12, 'z', sizeof buf12); } @@ -3749,7 +3749,7 @@ int write_dset_in(hid_t loc_id, if (make_diffs) { - memset(buf22,0,sizeof buf22); + HDmemset(buf22,0,sizeof buf22); } if ((tid = H5Tcopy(H5T_STD_B8LE)) < 0) @@ -3779,7 +3779,7 @@ int write_dset_in(hid_t loc_id, if (make_diffs) { - memset(buf32,0,sizeof buf32); + HDmemset(buf32,0,sizeof buf32); } if ((tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t))) < 0) @@ -3871,7 +3871,7 @@ int write_dset_in(hid_t loc_id, if (make_diffs) { - memset(buf62,0,sizeof buf62); + HDmemset(buf62,0,sizeof buf62); } @@ -3889,8 +3889,8 @@ int write_dset_in(hid_t loc_id, if(make_diffs) { - memset(buf72, 0, sizeof buf72); - memset(buf82, 0, sizeof buf82); + HDmemset(buf72, 0, sizeof buf72); + HDmemset(buf82, 0, sizeof buf82); } @@ -3930,7 +3930,7 @@ int write_dset_in(hid_t loc_id, if (make_diffs) { - memset(buf13,'z',sizeof buf13); + HDmemset(buf13,'z',sizeof buf13); } if ((tid = H5Tcopy(H5T_C_S1)) < 0) @@ -4243,9 +4243,9 @@ int make_dset_reg_ref(hid_t loc_id) out: if(wbuf) - free(wbuf); + HDfree(wbuf); if(dwbuf) - free(dwbuf); + HDfree(dwbuf); H5E_BEGIN_TRY { @@ -4650,7 +4650,7 @@ int write_attr_in(hid_t loc_id, */ if (make_diffs) { - memset(buf12, 'z', sizeof buf12); + HDmemset(buf12, 'z', sizeof buf12); } /* @@ -4690,7 +4690,7 @@ int write_attr_in(hid_t loc_id, if (make_diffs) { - memset(buf22,0,sizeof buf22); + HDmemset(buf22,0,sizeof buf22); } /* @@ -4750,7 +4750,7 @@ int write_attr_in(hid_t loc_id, */ if (make_diffs) { - memset(buf32,0,sizeof buf32); + HDmemset(buf32,0,sizeof buf32); } /* @@ -4898,7 +4898,7 @@ int write_attr_in(hid_t loc_id, if (make_diffs) { - memset(buf62,0,sizeof buf62); + HDmemset(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}}; @@ -4984,7 +4984,7 @@ int write_attr_in(hid_t loc_id, if (make_diffs) { - memset(buf13,'z',sizeof buf13); + HDmemset(buf13,'z',sizeof buf13); } /* |