summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-06-27 14:45:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-06-27 14:45:06 (GMT)
commit7be3afb278aea67ba09a97f4b41c0aaaf5c47983 (patch)
tree24ed86ab2a5c982fbf182d2ac8cd892c3813bc34 /tools/h5diff
parent8d72542a50fac7a747fe0bfec8d2285de8efd29f (diff)
downloadhdf5-7be3afb278aea67ba09a97f4b41c0aaaf5c47983.zip
hdf5-7be3afb278aea67ba09a97f4b41c0aaaf5c47983.tar.gz
hdf5-7be3afb278aea67ba09a97f4b41c0aaaf5c47983.tar.bz2
[svn-r12440] Purpose:
Code cleanup Description: Trim trailing whitespace in Makefile.am and C/C++ source files to make diffing changes easier. Platforms tested: None necessary, whitespace only change
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/Makefile.am2
-rw-r--r--tools/h5diff/h5diff_common.c32
-rw-r--r--tools/h5diff/h5diff_main.c10
-rw-r--r--tools/h5diff/h5diffgentest.c22
4 files changed, 33 insertions, 33 deletions
diff --git a/tools/h5diff/Makefile.am b/tools/h5diff/Makefile.am
index da2e851..382444c 100644
--- a/tools/h5diff/Makefile.am
+++ b/tools/h5diff/Makefile.am
@@ -47,7 +47,7 @@ ph5diff_SOURCES=ph5diff_main.c h5diff_common.c
h5diffgentest_SOURCES=h5diffgentest.c
# Programs depend on the main HDF5 library and tools library
-LDADD=$(LIBH5TOOLS) $(LIBHDF5)
+LDADD=$(LIBH5TOOLS) $(LIBHDF5)
# Temporary files. *.h5 are generated by h5diff. They should
# be copied to the testfiles/ directory if update is required
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c
index 6a24ab6..9ac4d56 100644
--- a/tools/h5diff/h5diff_common.c
+++ b/tools/h5diff/h5diff_common.c
@@ -25,29 +25,29 @@
*-------------------------------------------------------------------------
*/
-void parse_input(int argc, const char* argv[], const char** fname1, const char** fname2,
+void parse_input(int argc, const char* argv[], const char** fname1, const char** fname2,
const char** objname1, const char** objname2, diff_opt_t* options)
{
int i;
const char *s = NULL;
-
+
/* process the command-line */
memset(options, 0, sizeof (diff_opt_t));
-
+
/*-------------------------------------------------------------------------
* initial check of command line options
*-------------------------------------------------------------------------
*/
-
+
if ( argc==2 && (strcmp("-h",argv[1])==0) )
usage();
-
+
if ( argc<3 )
{
printf("Number of arguments is only %d\n", argc );
usage();
}
-
+
/*-------------------------------------------------------------------------
* file names are first
*-------------------------------------------------------------------------
@@ -144,9 +144,9 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char**
} /*switch*/
} /*for*/
} /*if*/
-
+
else /* not single-letter switches */
-
+
{
/* check if it is not a -d, -p parameter */
if ( '-'==argv[i-1][0] && ('d'==argv[i-1][1] ||'p'==argv[i-1][1] ))
@@ -169,7 +169,7 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char**
} /*objname2*/
} /*else*/
} /*else*/
-
+
}/*for*/
}
@@ -185,14 +185,14 @@ void print_results(diff_opt_t* options)
{
if (options->m_quiet || options->err_stat)
return;
-
+
if (options->cmn_objs==0)
{
printf("No common objects found. Files are not comparable.\n");
if (!options->m_verbose)
printf("Use -v for a list of objects.\n");
}
-
+
if (options->not_cmp==1)
{
printf("--------------------------------\n");
@@ -201,7 +201,7 @@ void print_results(diff_opt_t* options)
if (!options->m_verbose)
printf("Use -v for a list of objects.\n");
}
-
+
}
/*-------------------------------------------------------------------------
@@ -225,7 +225,7 @@ int check_n_input( const char *str )
{
unsigned i;
char c;
-
+
for ( i = 0; i < strlen(str); i++)
{
c = str[i];
@@ -259,18 +259,18 @@ int check_n_input( const char *str )
int check_f_input( const char *str )
{
double x;
-
+
/*
the atof return value on a hexadecimal input is different
on some systems; we do a character check for this
*/
if (strlen(str)>2 && str[0]=='0' && str[1]=='x')
return -1;
-
+
x=atof(str);
if (x==0)
return -1;
-
+
return 1;
}
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index 836a335..454a033 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -58,19 +58,19 @@ int main(int argc, const char *argv[])
const char *objname2 = NULL;
hsize_t nfound=0;
diff_opt_t options;
-
+
parse_input(argc, argv, &fname1, &fname2, &objname1, &objname2, &options);
-
+
nfound = h5diff(fname1,fname2,objname1,objname2,&options);
-
+
print_results(&options);
-
+
/*-------------------------------------------------------------------------
* exit code
* >0 if differences, 0 if no differences, <0 if error
*-------------------------------------------------------------------------
*/
-
+
ret= (nfound==0 ? 0 : 1 );
if (options.err_stat)
ret=-1;
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index 029e694..11459a4 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -339,7 +339,7 @@ int write_dset( hid_t loc_id,
*-------------------------------------------------------------------------
*/
-static
+static
void gen_datareg(hid_t fid,
int make_diffs /* flag to modify data buffers */)
{
@@ -367,14 +367,14 @@ void gen_datareg(hid_t fid,
for (i=0; i<10*10; i++)
{
- buf[i]=i;
+ buf[i]=i;
}
/* create the data dataset */
sid1 = H5Screate_simple(2,dims1,NULL);
did1 = H5Dcreate(fid,"dsetref",H5T_NATIVE_INT,sid1,H5P_DEFAULT);
status = H5Dwrite(did1,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf);
-
+
/* create the reference dataset */
sid2 = H5Screate_simple(1,dims2,NULL);
did2 = H5Dcreate(fid,"refreg",H5T_STD_REF_DSETREG,sid2,H5P_DEFAULT);
@@ -410,13 +410,13 @@ void gen_datareg(hid_t fid,
}
H5Sselect_elements(sid1,H5S_SELECT_SET,5,(const hsize_t **)coord);
H5Sget_select_npoints(sid1);
-
+
/* store second dataset region */
H5Rcreate(&rbuf[1],fid,"dsetref",H5R_DATASET_REGION,sid1);
/* write */
status = H5Dwrite(did2,H5T_STD_REF_DSETREG,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf);
-
+
/* close, free memory buffers */
status = H5Dclose(did1);
status = H5Sclose(sid1);
@@ -434,7 +434,7 @@ void gen_datareg(hid_t fid,
*
*-------------------------------------------------------------------------
*/
-static
+static
void write_dset_in(hid_t loc_id,
const char* dset_name, /* for saving reference to dataset*/
hid_t fid,
@@ -1025,7 +1025,7 @@ void write_dset_in(hid_t loc_id,
*
*-------------------------------------------------------------------------
*/
-static
+static
void write_attr_in(hid_t loc_id,
const char* dset_name, /* for saving reference to dataset*/
hid_t fid,
@@ -2092,7 +2092,7 @@ int test_dsetall(const char *file,
*-------------------------------------------------------------------------
*/
static
-int test_basic(const char *file1,
+int test_basic(const char *file1,
const char *file2)
{
@@ -2152,13 +2152,13 @@ int test_basic(const char *file1,
/*-------------------------------------------------------------------------
* Function: test_basic
*
- * Purpose: Compare different HDF5 types (H5G_obj_t):
+ * Purpose: Compare different HDF5 types (H5G_obj_t):
* H5G_DATASET, H5G_TYPE, H5G_GROUP, H5G_LINK
*
*-------------------------------------------------------------------------
*/
static
-int test_types(const char *file1,
+int test_types(const char *file1,
const char UNUSED *file2)
{
@@ -2241,7 +2241,7 @@ int test_types(const char *file1,
*-------------------------------------------------------------------------
*/
static
-int test_native(const char *file1,
+int test_native(const char *file1,
const char UNUSED *file2)
{