summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/testh5repack_util.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
commit6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch)
tree5a7a112fe7a8a98c6fecb45b513789d15962eb3d /tools/h5repack/testh5repack_util.c
parent6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff)
downloadhdf5-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/h5repack/testh5repack_util.c')
-rw-r--r--tools/h5repack/testh5repack_util.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/tools/h5repack/testh5repack_util.c b/tools/h5repack/testh5repack_util.c
index f74b414..cad52d3 100644
--- a/tools/h5repack/testh5repack_util.c
+++ b/tools/h5repack/testh5repack_util.c
@@ -28,7 +28,7 @@
*/
int make_dset(hid_t loc_id,
const char *name,
- hid_t sid,
+ hid_t sid,
hid_t dcpl,
void *buf)
{
@@ -67,37 +67,37 @@ int make_dset(hid_t loc_id,
*-------------------------------------------------------------------------
*/
-int write_dset( hid_t loc_id,
- int rank,
- hsize_t *dims,
+int write_dset( hid_t loc_id,
+ int rank,
+ hsize_t *dims,
const char *dset_name,
- hid_t type_id,
+ hid_t type_id,
void *buf )
{
hid_t dset_id;
- hid_t space_id;
-
+ hid_t space_id;
+
/* Create a buf space */
if ((space_id = H5Screate_simple(rank,dims,NULL))<0)
return -1;
-
+
/* Create a dataset */
if ((dset_id = H5Dcreate(loc_id,dset_name,type_id,space_id,H5P_DEFAULT))<0)
return -1;
-
+
/* Write the buf */
if ( buf )
if (H5Dwrite(dset_id,type_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
return -1;
-
+
/* Close */
if (H5Dclose(dset_id)<0)
return -1;
if (H5Sclose(space_id)<0)
return -1;
-
+
return 0;
-
+
}
@@ -112,37 +112,37 @@ int write_dset( hid_t loc_id,
*
*-------------------------------------------------------------------------
*/
-
-int make_attr(hid_t loc_id,
- int rank,
- hsize_t *dims,
+
+int make_attr(hid_t loc_id,
+ int rank,
+ hsize_t *dims,
const char *attr_name,
- hid_t type_id,
+ hid_t type_id,
void *buf)
{
hid_t attr_id;
- hid_t space_id;
-
+ hid_t space_id;
+
/* create a space */
if ((space_id = H5Screate_simple(rank,dims,NULL))<0)
return -1;
-
+
/* create the attribute */
if ((attr_id = H5Acreate(loc_id,attr_name,type_id,space_id,H5P_DEFAULT))<0)
goto out;
-
+
/* write the buffer */
if ( buf )
{
if (H5Awrite(attr_id,type_id,buf)<0)
goto out;
}
-
+
/* close */
H5Aclose(attr_id);
H5Sclose(space_id);
return 0;
-
+
out:
H5E_BEGIN_TRY {
H5Aclose(attr_id);