diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-12-29 14:26:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-12-29 14:26:20 (GMT) |
commit | 427ff7da2848042f68ecfadf5a321b1d8077e9db (patch) | |
tree | 73024b1954031fbb724c2d96a485590348e5cc22 /doc/html/DatatypesEnum.html | |
parent | 9b96fd2003ae74cca389cc4c2216b4371d6eb173 (diff) | |
download | hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.zip hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.gz hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.bz2 |
[svn-r9727] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-)
Description:
Generally speaking, this is the "signed->unsigned" change to selections.
However, in the process of merging code back, things got stickier and stickier
until I ended up doing a big "sync the two branches up" operation. So... I
brought back all the "infrastructure" fixes from the development branch to the
release branch (which I think were actually making some improvement in
performance) as well as fixed several bugs which had been fixed in one branch,
but not the other.
I've also tagged the repository before making this checkin with the label
"before_signed_unsigned_changes".
Platforms tested:
FreeBSD 4.10 (sleipnir) w/parallel & fphdf5
FreeBSD 4.10 (sleipnir) w/threadsafe
FreeBSD 4.10 (sleipnir) w/backward compatibility
Solaris 2.7 (arabica) w/"purify options"
Solaris 2.8 (sol) w/FORTRAN & C++
AIX 5.x (copper) w/parallel & FORTRAN
IRIX64 6.5 (modi4) w/FORTRAN
Linux 2.4 (heping) w/FORTRAN & C++
Misc. update:
Diffstat (limited to 'doc/html/DatatypesEnum.html')
-rw-r--r-- | doc/html/DatatypesEnum.html | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/doc/html/DatatypesEnum.html b/doc/html/DatatypesEnum.html index 2926e7c..607030a 100644 --- a/doc/html/DatatypesEnum.html +++ b/doc/html/DatatypesEnum.html @@ -239,7 +239,7 @@ H5Tlock(hdf_fr_colors);</pre> types. <br><br> - <dt><code>char *H5Tget_member_name(hid_t <em>etype</em>, int + <dt><code>char *H5Tget_member_name(hid_t <em>etype</em>, unsigned <em>membno</em>)</code> <dd>Given an enumeration data type <em>etype</em> this function returns the symbol name for the member indexed by @@ -252,7 +252,7 @@ H5Tlock(hdf_fr_colors);</pre> <code>free()</code>. <br><br> - <dt><code>herr_t H5Tget_member_value(hid_t <em>etype</em>, int + <dt><code>herr_t H5Tget_member_value(hid_t <em>etype</em>, unsigned <em>membno</em>, void *<em>value</em>/*out*/)</code> <dd>Given an enumeration data type <em>etype</em> this function returns the value associated with the member indexed by @@ -267,12 +267,13 @@ H5Tlock(hdf_fr_colors);</pre> when the type is not known by the C compiler. <pre> -int i, n = H5Tget_nmembers(hdf_en_colors); -for (i=0; i<n; i++) { - char *symbol = H5Tget_member_name(hdf_en_colors, i); +int n = H5Tget_nmembers(hdf_en_colors); +unsigned u; +for (u=0; u<(unsigned)n; u++) { + char *symbol = H5Tget_member_name(hdf_en_colors, u); short val; - H5Tget_member_value(hdf_en_colors, i, &val); - printf("#%d %20s = %d\n", i, symbol, val); + H5Tget_member_value(hdf_en_colors, u, &val); + printf("#%u %20s = %d\n", u, symbol, val); free(symbol); }</pre> @@ -445,13 +446,13 @@ int n = H5Tget_nmembers(foreign); hid_t itype = H5Tget_super(foreign); void *val = malloc(n * MAX(H5Tget_size(itype), sizeof(int))); char *name = malloc(n * sizeof(char*)); -int i; +unsigned u; /* Get foreign type information */ -for (i=0; i<n; i++) { - name[i] = H5Tget_member_name(foreign, i); - H5Tget_member_value(foreign, i, - (char*)val+i*H5Tget_size(foreign)); +for (u=0; u<(unsigned)n; u++) { + name[u] = H5Tget_member_name(foreign, u); + H5Tget_member_value(foreign, u, + (char*)val+u*H5Tget_size(foreign)); } /* Convert integer values to new type */ |