summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/h4toh5/h4toh5image.c54
-rw-r--r--tools/h4toh5/h4toh5sds.c19
-rw-r--r--tools/lib/talign.c4
3 files changed, 45 insertions, 32 deletions
diff --git a/tools/h4toh5/h4toh5image.c b/tools/h4toh5/h4toh5image.c
index 47c5363..b34f4af 100644
--- a/tools/h4toh5/h4toh5image.c
+++ b/tools/h4toh5/h4toh5image.c
@@ -322,7 +322,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
By default, we will compress HDF5 dataset by using gzip compression if HDF5 file is compressed. */
- write_plist = H5Pcreate(H5P_DATASET_XFER);
+ write_plist = H5Pcreate_list(H5P_DATASET_XFER_NEW);
bufsize = h4memsize *h5dims[1]*ncomp;
if(H5Pset_buffer(write_plist,bufsize,NULL,NULL)<0) {
@@ -330,7 +330,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -343,7 +343,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -354,7 +354,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -364,7 +364,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -378,7 +378,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -388,7 +388,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -404,7 +404,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -414,7 +414,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -424,7 +424,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -434,7 +434,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -444,7 +444,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -454,7 +454,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
}
@@ -465,7 +465,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -476,7 +476,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -486,7 +486,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
ret = H5Tclose(h5_ctype);
@@ -512,7 +512,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(image_data);
free(h5cimage_name);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
return FAIL;
@@ -523,7 +523,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(h5cimage_name);
free(image_data);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
return FAIL;
@@ -534,7 +534,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
free(h5cimage_name);
free(image_data);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
return FAIL;
@@ -549,7 +549,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
printf(" cannot obtain attributes. \n");
free(image_data);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
return FAIL;
@@ -573,7 +573,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
if(h4_transpredattrs(h5dset,HDF4_OBJECT_TYPE,grlabel)==FAIL){
printf("error in getting hdf4 image type attribute \n");
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
free(h5cimage_name);
@@ -585,7 +585,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
if(h4_transpredattrs(h5dset,HDF4_OBJECT_NAME,image_name)==FAIL){
printf("error in getting hdf4 image name attribute. \n");
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
free(h5cimage_name);
@@ -596,7 +596,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
if(h4_transpredattrs(h5dset,HDF4_IMAGE_CLASS,image_class)==FAIL){
printf("error in getting hdf4 image class attribute. \n");
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
free(h5cimage_name);
@@ -611,7 +611,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
if(gr_ref == 0) {
printf("error in obtaining reference number of GR.\n");
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
free(h5cimage_name);
@@ -622,7 +622,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
if(h4_transnumattr(h5dset,HDF4_REF_NUM,gr_ref)==FAIL) {
printf("error in getting hdf4 image number attribute.\n");
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
free(h5cimage_name);
@@ -635,7 +635,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
if(gr_palette(file_id,ri_id,h5dset,h5_palgroup,h4_attr)== FAIL) {
printf("error in translating palette into h5 dataset.\n");
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
H5Sclose(h5d_sid);
H5Dclose(h5dset);
free(h5cimage_name);
@@ -644,7 +644,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
}
ret = H5Pclose(create_plist);
- ret = H5Pclose(write_plist);
+ ret = H5Pclose_list(write_plist);
ret = H5Sclose(h5d_sid);
ret = H5Dclose(h5dset);
istat = GRendaccess(ri_id);
diff --git a/tools/h4toh5/h4toh5sds.c b/tools/h4toh5/h4toh5sds.c
index a4d9e3b..58bca68 100644
--- a/tools/h4toh5/h4toh5sds.c
+++ b/tools/h4toh5/h4toh5sds.c
@@ -420,7 +420,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
return FAIL;
}
- write_plist = H5Pcreate(H5P_DATASET_XFER);
+ write_plist = H5Pcreate_list(H5P_DATASET_XFER_NEW);
bufsize = h4memsize;
for(i=1;i<sds_rank;i++)
bufsize *= h5dims[i];
@@ -433,6 +433,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
free(chunk_dims);
H5Sclose(h5d_sid);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -443,6 +444,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
free(sds_start);
free(sds_edge);
free(sds_stride);
@@ -470,6 +472,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -483,6 +486,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -496,6 +500,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -510,6 +515,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
check_gloattr = 0;
@@ -522,6 +528,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
printf(" Error in obtaining sds attributes. \n");
return FAIL;
}
@@ -542,6 +549,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
printf("unable to transfer sds label to HDF4 OBJECT TYPE.\n");
return FAIL;
}
@@ -556,6 +564,7 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
printf("unable to transfer sds name to HDF5 dataset attribute.\n");
return FAIL;
}
@@ -570,12 +579,14 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
printf("unable to transfer sds ref. to HDF5 dataset attribute.\n");
return FAIL;
}
}
istat = SDendaccess(sds_id);
ret = H5Pclose(create_plist);
+ ret = H5Pclose_list(write_plist);
ret = H5Sclose(h5d_sid);
ret = H5Dclose(h5dset);
free(sds_data);
@@ -1471,7 +1482,7 @@ int convert_sdsfillvalue(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimg
}
/* Before HDF5 library make the optimzation of dealing with fill value
data, leave this alone. */
- /* write_plist = H5Pcreate(H5P_DATASET_XFER);
+ /* write_plist = H5Pcreate_list(H5P_DATASET_XFER_NEW);
bufsize = h4memsize;
for(i=1;i<sds_rank;i++)
bufsize *= h5dims[i];
@@ -1484,6 +1495,7 @@ int convert_sdsfillvalue(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimg
H5Sclose(h5d_sid);
H5Pclose(create_plist);
+ H5Pclose_list(write_plist);
return FAIL;
}
@@ -1494,7 +1506,7 @@ int convert_sdsfillvalue(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimg
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
- H5Pclose(write_plist);
+ H5Pclose_list(write_plist);
free(sds_start);
free(sds_edge);
free(sds_stride);
@@ -1618,6 +1630,7 @@ int convert_sdsfillvalue(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimg
H5Sclose(h5d_sid);
H5Dclose(h5dset);
H5Pclose(create_plist);
+/* H5Pclose_list(write_plist); */
return SUCCEED;
}
diff --git a/tools/lib/talign.c b/tools/lib/talign.c
index 5c4f88d..91cec99 100644
--- a/tools/lib/talign.c
+++ b/tools/lib/talign.c
@@ -91,7 +91,7 @@ int main(void)
H5Tinsert(cmp3, "Not Ok", 0, array_dt);
H5Tclose(array_dt);
- plist = H5Pcreate(H5P_DATASET_XFER);
+ plist = H5Pcreate_list(H5P_DATASET_XFER_NEW);
H5Pset_preserve(plist, 1);
/*
@@ -166,7 +166,7 @@ int main(void)
H5Tclose(cmp1);
H5Tclose(cmp2);
H5Tclose(cmp3);
- H5Pclose(plist);
+ H5Pclose_list(plist);
H5Fclose(fil);
unlink(fname);
fflush(stdout);