diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-04 15:06:28 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-04 15:06:28 (GMT) |
commit | 59b51a2ea72ff98586372a454adfd8c790a62734 (patch) | |
tree | 74173cf2dab79097c9dc8f116a22ad0138d310a2 /hl/src/H5IM.c | |
parent | 302830e60108513d9ff2e710444dc0d0188c92ee (diff) | |
download | hdf5-59b51a2ea72ff98586372a454adfd8c790a62734.zip hdf5-59b51a2ea72ff98586372a454adfd8c790a62734.tar.gz hdf5-59b51a2ea72ff98586372a454adfd8c790a62734.tar.bz2 |
[svn-r14180] Description:
Make H5Aiterate() versioned and change all internal use to H5Aiterate2()
Leave some regression tests that exercise H5Aiterate1()
Fix attribute display in h5dump & h5ls to be "by name" by default
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'hl/src/H5IM.c')
-rw-r--r-- | hl/src/H5IM.c | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 30a479e..70baf26 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -166,30 +166,23 @@ herr_t H5IMmake_image_24bit( hid_t loc_id, * *------------------------------------------------------------------------- */ - -static herr_t find_palette( hid_t loc_id, const char *name, void *op_data ) +static herr_t +find_palette(hid_t loc_id, const char *name, const H5A_info_t *ainfo, + void *op_data) { + int ret = H5_ITER_CONT; - /* Define a default zero value for return. This will cause the iterator to continue if - * the palette attribute is not found yet. - */ - - int ret = 0; - - /* Shut compiler */ - loc_id=loc_id; - op_data=op_data; - - /* Define a positive value for return value if the attribute was found. This will - * cause the iterator to immediately return that positive value, - * indicating short-circuit success - */ - - if( strcmp( name, "PALETTE" ) == 0 ) - ret = 1; + /* Shut compiler up */ + loc_id = loc_id; ainfo = ainfo; op_data = op_data; + /* Define a positive value for return value if the attribute was found. This will + * cause the iterator to immediately return that positive value, + * indicating short-circuit success + */ + if(strcmp(name, "PALETTE") == 0) + ret = H5_ITER_STOP; - return ret; + return ret; } @@ -205,7 +198,7 @@ static herr_t find_palette( hid_t loc_id, const char *name, void *op_data ) * Date: May 11, 2001 * * Comments: - * The function uses H5Aiterate with the operator function find_palette + * The function uses H5Aiterate2 with the operator function find_palette * * Modifications: * @@ -214,14 +207,7 @@ static herr_t find_palette( hid_t loc_id, const char *name, void *op_data ) herr_t H5IM_find_palette( hid_t loc_id ) { - - unsigned int attr_num; /* Starting attribute to look up */ - herr_t ret; - - attr_num = 0; - ret = H5Aiterate( loc_id, &attr_num, find_palette, 0 ); - - return ret; + return H5Aiterate2(loc_id, ".", H5_INDEX_NAME, H5_ITER_INC, NULL, find_palette, NULL, H5P_DEFAULT); } |