summaryrefslogtreecommitdiffstats
path: root/c++/examples/compound.cpp
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 /c++/examples/compound.cpp
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 'c++/examples/compound.cpp')
-rw-r--r--c++/examples/compound.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/c++/examples/compound.cpp b/c++/examples/compound.cpp
index d3163d6..dfbd544 100644
--- a/c++/examples/compound.cpp
+++ b/c++/examples/compound.cpp
@@ -45,7 +45,7 @@ int main(void)
typedef struct s1_t {
int a;
float b;
- double c;
+ double c;
} s1_t;
/* Second structure (subset of s1_t) and dataset*/
@@ -87,21 +87,21 @@ int main(void)
H5File* file = new H5File( FILE_NAME, H5F_ACC_TRUNC );
/*
- * Create the memory datatype.
+ * Create the memory datatype.
*/
CompType mtype1( sizeof(s1_t) );
mtype1.insertMember( MEMBER1, HOFFSET(s1_t, a), PredType::NATIVE_INT);
mtype1.insertMember( MEMBER3, HOFFSET(s1_t, c), PredType::NATIVE_DOUBLE);
mtype1.insertMember( MEMBER2, HOFFSET(s1_t, b), PredType::NATIVE_FLOAT);
- /*
+ /*
* Create the dataset.
*/
DataSet* dataset;
dataset = new DataSet( file->createDataSet( DATASET_NAME, mtype1, space ));
/*
- * Wtite data to the dataset;
+ * Wtite data to the dataset;
*/
dataset->write( s1, mtype1 );
@@ -110,7 +110,7 @@ int main(void)
*/
delete dataset;
delete file;
-
+
// Get the class of the first member in mtype1, then get its type
H5T_class_t member1_class = mtype1.getMemberClass( 2 );
if( member1_class == H5T_FLOAT )
@@ -127,7 +127,7 @@ int main(void)
file = new H5File( FILE_NAME, H5F_ACC_RDONLY );
dataset = new DataSet (file->openDataSet( DATASET_NAME ));
- /*
+ /*
* Create a datatype for s2
*/
CompType mtype2( sizeof(s2_t) );
@@ -151,11 +151,11 @@ int main(void)
cout << endl;
cout << endl << "Field a : " << endl;
- for( i = 0; i < LENGTH; i++)
+ for( i = 0; i < LENGTH; i++)
cout << s2[i].a << " ";
cout << endl;
- /*
+ /*
* Create a datatype for s3.
*/
CompType mtype3( sizeof(float) );