summaryrefslogtreecommitdiffstats
path: root/hl/src/H5IM.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2005-03-21 21:28:13 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2005-03-21 21:28:13 (GMT)
commit98b02fbdcbe12ae422b3ee62f2dcab0025ce6b54 (patch)
tree5a1c237add42edf7f7d99e377a2a812574a4a438 /hl/src/H5IM.c
parent7079f6b1e90ae02ec6abbb3457047d9e8d7f2956 (diff)
downloadhdf5-98b02fbdcbe12ae422b3ee62f2dcab0025ce6b54.zip
hdf5-98b02fbdcbe12ae422b3ee62f2dcab0025ce6b54.tar.gz
hdf5-98b02fbdcbe12ae422b3ee62f2dcab0025ce6b54.tar.bz2
[svn-r10248] Purpose:
new tests for DS Description: add a test that ckecks if a scale being attached itself has scales attached (error) add a test for the dataset being attached to is a reserved High Level class (image, palette, table) Solution: Platforms tested: linux solaris Misc. update:
Diffstat (limited to 'hl/src/H5IM.c')
-rw-r--r--hl/src/H5IM.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c
index d1633f0..2492562 100644
--- a/hl/src/H5IM.c
+++ b/hl/src/H5IM.c
@@ -55,7 +55,7 @@ herr_t H5IMmake_image_8bit( hid_t loc_id,
return -1;
/* Attach the CLASS attribute */
- if ( H5LTset_attribute_string( loc_id, dset_name, "CLASS", "IMAGE" ) < 0 )
+ if ( H5LTset_attribute_string( loc_id, dset_name, "CLASS", IMAGE_CLASS ) < 0 )
return -1;
/* Attach the VERSION attribute */
@@ -130,7 +130,7 @@ herr_t H5IMmake_image_24bit( hid_t loc_id,
return -1;
/* Attach the CLASS attribute */
- if ( H5LTset_attribute_string( loc_id, dset_name, "CLASS", "IMAGE" ) < 0 )
+ if ( H5LTset_attribute_string( loc_id, dset_name, "CLASS", IMAGE_CLASS ) < 0 )
return -1;
/* Attach the VERSION attribute */
@@ -484,7 +484,7 @@ herr_t H5IMmake_palette( hid_t loc_id,
return -1;
/* Attach the attribute "CLASS" to the >>palette<< dataset*/
- if ( H5LTset_attribute_string( loc_id, pal_name, "CLASS", "PALETTE" ) < 0 )
+ if ( H5LTset_attribute_string( loc_id, pal_name, "CLASS", PALETTE_CLASS ) < 0 )
return -1;
/* Attach the attribute "PAL_VERSION" to the >>palette<< dataset*/
@@ -1152,7 +1152,7 @@ herr_t H5IMis_image( hid_t loc_id,
if ( H5Aread( attr_id, attr_type, attr_data ) < 0 )
goto out;
- if( strcmp( attr_data, "IMAGE" ) == 0 )
+ if( strcmp( attr_data, IMAGE_CLASS ) == 0 )
ret = 1;
else
ret = 0;
@@ -1216,7 +1216,7 @@ herr_t H5IMis_palette( hid_t loc_id,
if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
return -1;
- /* Try to find the attribute "CLASS" on the dataset */
+ /* Try to find the attribute "CLASS" on the dataset */
has_class = H5LT_find_attribute( did, "CLASS" );
if ( has_class == 0 )
@@ -1240,7 +1240,7 @@ herr_t H5IMis_palette( hid_t loc_id,
if ( H5Aread( attr_id, attr_type, attr_data ) < 0 )
goto out;
- if( strcmp( attr_data, "PALETTE" ) == 0 )
+ if( strcmp( attr_data, PALETTE_CLASS ) == 0 )
ret = 1;
else
ret = 0;
@@ -1253,7 +1253,7 @@ herr_t H5IMis_palette( hid_t loc_id,
}
- /* Close the dataset. */
+ /* Close the dataset. */
if ( H5Dclose( did ) < 0 )
return -1;