diff options
Diffstat (limited to 'tools/h4toh5/h4toh5sds.c')
-rw-r--r-- | tools/h4toh5/h4toh5sds.c | 19 |
1 files changed, 16 insertions, 3 deletions
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; } |