summaryrefslogtreecommitdiffstats
path: root/tools/h4toh5main.c
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2001-02-16 03:35:37 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2001-02-16 03:35:37 (GMT)
commit5dc419551e3677f6b417ade268da3ee380245b75 (patch)
tree3e5ddb5d15da02e5b04cf0a1017f4d8beaa1f694 /tools/h4toh5main.c
parenta7c25153bc0b6077613307afd90b6b98c4ebb194 (diff)
downloadhdf5-5dc419551e3677f6b417ade268da3ee380245b75.zip
hdf5-5dc419551e3677f6b417ade268da3ee380245b75.tar.gz
hdf5-5dc419551e3677f6b417ade268da3ee380245b75.tar.bz2
[svn-r3415]
Purpose: bug fix Description: two bugs: 1. different order of conventions of sds and image in hdf4 is considered at h4toh5image.c file. add palette colormodel attribute and correct names of a few attributes. see detail at: http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageDetails.htm 2. convert hdf internal vdata structure(chunking table) into a new hdf5 dataset. Solution: 1. change h5 data space order for image. h5dims[0] = edge[1]-edge[0]; h5dims[1] = start[1]-start[0]; 2. at h4toh5main.c, check the vdata class name and if the first few characters match with HDF_CHK_TBL; ignore converting this vdata. 3. add a few attributes at h4toh5pal.c platforms: linux and sun 5.7(arabica) such as Big-endian-32bit (SUN/IRIX), little-endian-32(LINUX) and 64-bit (IRIX64/UNICOS/DEC-ALPHA) would be good.]
Diffstat (limited to 'tools/h4toh5main.c')
-rw-r--r--tools/h4toh5main.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/tools/h4toh5main.c b/tools/h4toh5main.c
index 9881ce0..5e7c6d6 100644
--- a/tools/h4toh5main.c
+++ b/tools/h4toh5main.c
@@ -1100,7 +1100,25 @@ int h4toh5lonevds(int32 file_id, hid_t h5group){
/* Make sure this vdata is not an attribute of other hdf4 objects.*/
if(!VSisattr(vdata_id)) {
+
+ h4toh5_ZeroMemory(vdata_class,VGNAMELENMAX);
+ istat = VSgetclass(vdata_id,vdata_class);
+ if(istat == FAIL) {
+ printf("error in getting vdata class name.\n");
+ free(ref_vdata_array);
+ VSdetach(vdata_id);
+ return FAIL;
+ }
+
+
+ if(!strncmp(vdata_class,_HDF_CHK_TBL_CLASS,strlen(_HDF_CHK_TBL_CLASS))){
+
+ VSdetach(vdata_id);
+ continue;
+ }
+
vdata_ref = VSQueryref(vdata_id);
+
if(vdata_ref == FAIL) {
printf("error in getting vdata reference number.\n");
free(ref_vdata_array);
@@ -1116,17 +1134,10 @@ int h4toh5lonevds(int32 file_id, hid_t h5group){
return FAIL;
}
- h4toh5_ZeroMemory(vdata_class,VGNAMELENMAX);
- istat = VSgetclass(vdata_id,vdata_class);
- if(istat == FAIL) {
- printf("error in getting vdata class name.\n");
- free(ref_vdata_array);
- VSdetach(vdata_id);
- return FAIL;
- }
h4toh5_ZeroMemory(vdata_name,VGNAMELENMAX);
istat = VSQueryname(vdata_id,vdata_name);
+
if(istat == FAIL) {
printf("error in getting vdata name. \n");
free(ref_vdata_array);