summaryrefslogtreecommitdiffstats
path: root/tools/h4toh5/h4toh5sds.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-08-10 20:47:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-08-10 20:47:05 (GMT)
commit95862451f78960cab031031011e5c6a131e0d026 (patch)
tree391101ca102fbecbfe9cee1f608b90bb87d49b1a /tools/h4toh5/h4toh5sds.c
parent4049965d1337bc54a21a4d3af71aa793e4baf029 (diff)
downloadhdf5-95862451f78960cab031031011e5c6a131e0d026.zip
hdf5-95862451f78960cab031031011e5c6a131e0d026.tar.gz
hdf5-95862451f78960cab031031011e5c6a131e0d026.tar.bz2
[svn-r4324] Purpose:
New Features! Description: Start migrating the internal use of property lists in the library from the older implementation to the new generic property lists. Currently, only the dataset transfer property lists are migrated to the new architecture, all the rest of the property list types are still using the older architecture. Also, the backward compatibility features are not implemented yet, so applications which use dataset transfer properties may need to make the following changes: H5Pcreate(H5P_DATASET_XFER) -> H5Pcreate_list(H5P_DATASET_XFER_NEW) and H5Pclose(<a dataset transfer property list>) -> H5Pclose_list(id) This still may have some bugs in it, especially with Fortran, but I should be wrapping up those later today. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'tools/h4toh5/h4toh5sds.c')
-rw-r--r--tools/h4toh5/h4toh5sds.c19
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;
}