summaryrefslogtreecommitdiffstats
path: root/tools/h4toh5/h4toh5util.c
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2001-06-11 21:20:10 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2001-06-11 21:20:10 (GMT)
commit1a5197918c0ef3e9f26af8538cf8c278bfa09fe2 (patch)
tree69beb8b96244f379cc524d7d8fac3a66559b3886 /tools/h4toh5/h4toh5util.c
parent1b484c377cfb56b4f36840f74a85bf86211f71e6 (diff)
downloadhdf5-1a5197918c0ef3e9f26af8538cf8c278bfa09fe2.zip
hdf5-1a5197918c0ef3e9f26af8538cf8c278bfa09fe2.tar.gz
hdf5-1a5197918c0ef3e9f26af8538cf8c278bfa09fe2.tar.bz2
[svn-r3988]
Purpose: new features Description: 1. add an option to convert HDF4 file without HDF4 specified attributes such as HDF4_OBJECT_TYPE, HDF4_REF_NUM etc. it can be done by inputting "h4toh5 -na input.hdf" The default converter will still keep HDF4 specfied attributes. 2. Add compression features (gzip) for image too. Now the compressed HDF4 image can be supported by using HDF5 gzip. Not sure whether tools can read it. Need to be tested. 3. Change SPACEPAD to NULLTERM for HDF4 dimensional name list. We can use variable length HDF5 string to represent these names, however currently H5dump and H5view cannot support variable length HDF5 string. converter will wait for other tools' update. Solution: Platforms tested: eirene(Red Hat 6.2) and arabica(solaris 2.7)
Diffstat (limited to 'tools/h4toh5/h4toh5util.c')
-rw-r--r--tools/h4toh5/h4toh5util.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/h4toh5/h4toh5util.c b/tools/h4toh5/h4toh5util.c
index 879e8a9..2b6586e 100644
--- a/tools/h4toh5/h4toh5util.c
+++ b/tools/h4toh5/h4toh5util.c
@@ -1078,7 +1078,7 @@ int h4_transpredattrs(hid_t h5g,const char *attrname,char*data){
*-------------------------------------------------------------------------
*/
-int vg_transattrs(int32 h4vg,hid_t h5g) {
+int vg_transattrs(int32 h4vg,hid_t h5g,int h4_attr) {
/* define variables for hdf4. */
char vgroup_name[VGNAMELENMAX];
@@ -1108,7 +1108,7 @@ int vg_transattrs(int32 h4vg,hid_t h5g) {
int i;
num_vgattr = Vnattrs(h4vg);
-
+
for (i = 0;i <num_vgattr;i++) {
if (Vattrinfo(h4vg,i,vgattr_name,&vg_atype,
@@ -1238,6 +1238,8 @@ int vg_transattrs(int32 h4vg,hid_t h5g) {
}
/*** check this line later. ***/
+
+ if(h4_attr != 0) {
strcpy(obtype,VGROUPLABEL);
vgroup_class[0] = '\0';
@@ -1282,7 +1284,7 @@ int vg_transattrs(int32 h4vg,hid_t h5g) {
printf("error in data attribute transferring.\n");
return FAIL;
}
-
+ }
return SUCCEED;
}