diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
commit | 6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch) | |
tree | 5a7a112fe7a8a98c6fecb45b513789d15962eb3d /tools/lib/h5diff_attr.c | |
parent | 6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff) | |
download | hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2 |
[svn-r11245] Purpose:
Code cleanup
Description:
Trim trailing whitespace, which is making 'diff'ing the two branches
difficult.
Solution:
Ran this script in each directory:
foreach f (*.[ch] *.cpp)
sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
end
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
Diffstat (limited to 'tools/lib/h5diff_attr.c')
-rw-r--r-- | tools/lib/h5diff_attr.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 56e2af1..aa52d8b 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -14,19 +14,19 @@ #include "h5tools.h" #include "h5diff.h" -#include "H5private.h" +#include "H5private.h" /*------------------------------------------------------------------------- * Function: diff_attr * - * Purpose: compare attributes located in LOC1_ID and LOC2_ID, which are - * obtained either from + * Purpose: compare attributes located in LOC1_ID and LOC2_ID, which are + * obtained either from * loc_id = H5Gopen( fid, name); * loc_id = H5Dopen( fid, name); * loc_id = H5Topen( fid, name); * - * Return: + * Return: * 0 : no differences found * 1 : differences found * @@ -37,19 +37,19 @@ *------------------------------------------------------------------------- */ -int diff_attr(hid_t loc1_id, - hid_t loc2_id, - const char *path1, - const char *path2, +int diff_attr(hid_t loc1_id, + hid_t loc2_id, + const char *path1, + const char *path2, diff_opt_t *options ) { - hid_t attr1_id=-1; /* attr ID */ - hid_t attr2_id=-1; /* attr ID */ - hid_t space1_id=-1; /* space ID */ - hid_t space2_id=-1; /* space ID */ - hid_t ftype1_id=-1; /* file data type ID */ - hid_t ftype2_id=-1; /* file data type ID */ + hid_t attr1_id=-1; /* attr ID */ + hid_t attr2_id=-1; /* attr ID */ + hid_t space1_id=-1; /* space ID */ + hid_t space2_id=-1; /* space ID */ + hid_t ftype1_id=-1; /* file data type ID */ + hid_t ftype2_id=-1; /* file data type ID */ hid_t mtype1_id=-1; /* memory data type ID */ hid_t mtype2_id=-1; /* memory data type ID */ size_t msize1; /* memory size of memory type */ @@ -68,9 +68,9 @@ int diff_attr(hid_t loc1_id, hsize_t nfound; int cmp=1; - if ((n1 = H5Aget_num_attrs(loc1_id))<0) + if ((n1 = H5Aget_num_attrs(loc1_id))<0) goto error; - if ((n2 = H5Aget_num_attrs(loc2_id))<0) + if ((n2 = H5Aget_num_attrs(loc2_id))<0) goto error; if (n1!=n2) @@ -80,28 +80,28 @@ int diff_attr(hid_t loc1_id, { /* reset buffers for every attribute, we might goto out and call free */ - buf1=NULL; - buf2=NULL; + buf1=NULL; + buf2=NULL; /*------------------------------------------------------------------------- * open *------------------------------------------------------------------------- */ /* open attribute */ - if ((attr1_id = H5Aopen_idx(loc1_id, (unsigned)i))<0) + if ((attr1_id = H5Aopen_idx(loc1_id, (unsigned)i))<0) goto error; - if ((attr2_id = H5Aopen_idx(loc2_id, (unsigned)i))<0) + if ((attr2_id = H5Aopen_idx(loc2_id, (unsigned)i))<0) goto error; /* get name */ - if (H5Aget_name( attr1_id, 255, name1 )<0) + if (H5Aget_name( attr1_id, 255, name1 )<0) goto error; - if (H5Aget_name( attr2_id, 255, name2 )<0) + if (H5Aget_name( attr2_id, 255, name2 )<0) goto error; if (HDstrcmp(name1,name2)!=0) { - if (options->m_verbose) + if (options->m_verbose) { parallel_print("Different name for attributes: <%s> and <%s>\n", name1, name2); } @@ -135,26 +135,26 @@ int diff_attr(hid_t loc1_id, *------------------------------------------------------------------------- */ - if (diff_can_type(ftype1_id, - ftype2_id, - rank1, + if (diff_can_type(ftype1_id, + ftype2_id, + rank1, rank2, - dims1, + dims1, dims2, - NULL, NULL, - name1, - name2, + NULL, + name1, + name2, options)!=1) { cmp=0; options->not_cmp=1; } /*------------------------------------------------------------------------- - * only attempt to compare if possible + * only attempt to compare if possible *------------------------------------------------------------------------- */ - if (cmp) + if (cmp) { /*------------------------------------------------------------------------- @@ -162,7 +162,7 @@ int diff_attr(hid_t loc1_id, *------------------------------------------------------------------------- */ nelmts1=1; - for (j=0; j<rank1; j++) + for (j=0; j<rank1; j++) nelmts1*=dims1[j]; if ((mtype1_id=h5tools_get_native_type(ftype1_id))<0) @@ -200,8 +200,8 @@ int diff_attr(hid_t loc1_id, /* always print name */ if (options->m_verbose) { - parallel_print( "Attribute: <%s> and <%s>\n",name1,name2); - nfound = diff_array(buf1, + parallel_print( "Attribute: <%s> and <%s>\n",name1,name2); + nfound = diff_array(buf1, buf2, nelmts1, rank1, @@ -222,7 +222,7 @@ int diff_attr(hid_t loc1_id, { /* shut up temporarily */ options->m_quiet=1; - nfound = diff_array(buf1, + nfound = diff_array(buf1, buf2, nelmts1, rank1, @@ -235,10 +235,10 @@ int diff_attr(hid_t loc1_id, attr2_id); /* print again */ options->m_quiet=0; - if (nfound) + if (nfound) { - parallel_print( "Attribute: <%s> and <%s>\n",name1,name2); - nfound = diff_array(buf1, + parallel_print( "Attribute: <%s> and <%s>\n",name1,name2); + nfound = diff_array(buf1, buf2, nelmts1, rank1, @@ -255,7 +255,7 @@ int diff_attr(hid_t loc1_id, /* in quiet mode, just count differences */ else { - nfound = diff_array(buf1, + nfound = diff_array(buf1, buf2, nelmts1, rank1, |