summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-08-05 19:35:46 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-08-05 19:35:46 (GMT)
commite46107ca75c83c11759defaeb4d1ce5630b91656 (patch)
tree03c1a3b05d271302168e927282eba62021812686 /tools/lib/h5diff.c
parentd364dc74a48d3e406d61920e1c3cccdf961b24d8 (diff)
downloadhdf5-e46107ca75c83c11759defaeb4d1ce5630b91656.zip
hdf5-e46107ca75c83c11759defaeb4d1ce5630b91656.tar.gz
hdf5-e46107ca75c83c11759defaeb4d1ce5630b91656.tar.bz2
[svn-r15433] http://bugzilla.hdfgroup.uiuc.edu/show_bug.cgi?id=1170
Summary: when using h5diff to compare the results of h5repack (or other tools that copy one HDF5 file to another), a new option is needed to allow h5diff to make an "absolute" comparison of the 2 files. This is the "contents" mode explained in the usage below. If this mode is present, objects in both files must match (must be exactly the same). If this does not happen, the tool returns an error code of 1 (instead of the success code of 0) Changes to the h5repack test script: the call to h5diff was changed to include -c (maintaining the previous -q). tested: windows, linux
Diffstat (limited to 'tools/lib/h5diff.c')
-rw-r--r--tools/lib/h5diff.c352
1 files changed, 225 insertions, 127 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 4f4074f..3bd6fb3 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -186,15 +186,17 @@ hsize_t h5diff(const char *fname1,
const char *objname2,
diff_opt_t *options)
{
- trav_info_t *info1;
- trav_info_t *info2;
- hid_t file1_id = (-1), file2_id = (-1);
+ trav_info_t *info1=NULL;
+ trav_info_t *info2=NULL;
+ hid_t file1_id = (-1);
+ hid_t file2_id = (-1);
char filenames[2][1024];
hsize_t nfound = 0;
HDmemset(filenames, 0, 1024 * 2);
- if(options->m_quiet && (options->m_verbose || options->m_report)) {
+ if(options->m_quiet && (options->m_verbose || options->m_report))
+ {
printf("Error: -q (quiet mode) cannot be added to verbose or report modes\n");
options->err_stat=1;
return 0;
@@ -206,9 +208,11 @@ hsize_t h5diff(const char *fname1,
*/
/* disable error reporting */
- H5E_BEGIN_TRY {
- /* Open the files */
- if((file1_id = H5Fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
+ H5E_BEGIN_TRY
+ {
+ /* open the files */
+ if((file1_id = H5Fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ {
printf("h5diff: <%s>: unable to open file\n", fname1);
options->err_stat = 1;
@@ -219,7 +223,8 @@ hsize_t h5diff(const char *fname1,
#endif
goto out;
} /* end if */
- if((file2_id = H5Fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
+ if((file2_id = H5Fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ {
printf("h5diff: <%s>: unable to open file\n", fname2);
options->err_stat = 1;
@@ -255,11 +260,12 @@ hsize_t h5diff(const char *fname1,
goto out;
} /* end if */
- /*-------------------------------------------------------------------------
+ /*-------------------------------------------------------------------------
* object name was supplied
*-------------------------------------------------------------------------
*/
- if(objname1) {
+ if( objname1 )
+ {
#ifdef H5_HAVE_PARALLEL
if(g_Parallel)
/* Let tasks know that they won't be needed */
@@ -267,22 +273,31 @@ hsize_t h5diff(const char *fname1,
#endif
assert(objname2);
options->cmn_objs = 1; /* eliminate warning */
- nfound = diff_compare(file1_id, fname1, objname1, info1,
- file2_id, fname2, objname2, info2,
+ nfound = diff_compare(file1_id,
+ fname1,
+ objname1,
+ info1,
+ file2_id,
+ fname2,
+ objname2,
+ info2,
options);
} /* end if */
- /*-------------------------------------------------------------------------
+ /*-------------------------------------------------------------------------
* compare all
*-------------------------------------------------------------------------
*/
- else {
+ else
+ {
#ifdef H5_HAVE_PARALLEL
- if(g_Parallel) {
+ if(g_Parallel)
+ {
int i;
- if((HDstrlen(fname1) > 1024) || (HDstrlen(fname2) > 1024)) {
+ if((HDstrlen(fname1) > 1024) || (HDstrlen(fname2) > 1024))
+ {
fprintf(stderr, "The parallel diff only supports path names up to 1024 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
@@ -295,7 +310,12 @@ hsize_t h5diff(const char *fname1,
MPI_Send(filenames, (1024 * 2), MPI_CHAR, i, MPI_TAG_PARALLEL, MPI_COMM_WORLD);
} /* end if */
#endif
- nfound = diff_match(file1_id, info1, file2_id, info2, options);
+
+ nfound = diff_match(file1_id,
+ info1,
+ file2_id,
+ info2,
+ options);
} /* end else */
trav_info_free(info1);
@@ -303,7 +323,8 @@ hsize_t h5diff(const char *fname1,
out:
/* close */
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Fclose(file1_id);
H5Fclose(file2_id);
} H5E_END_TRY;
@@ -332,26 +353,28 @@ out:
*-------------------------------------------------------------------------
*/
hsize_t diff_match(hid_t file1_id,
- trav_info_t * info1,
- hid_t file2_id,
- trav_info_t * info2,
- diff_opt_t * options)
+ trav_info_t *info1,
+ hid_t file2_id,
+ trav_info_t *info2,
+ diff_opt_t *options)
{
trav_table_t *table = NULL;
- size_t curr1, curr2;
- unsigned infile[2];
- hsize_t nfound = 0;
- unsigned i;
+ size_t curr1;
+ size_t curr2;
+ unsigned infile[2];
+ hsize_t nfound = 0;
+ unsigned i;
/*-------------------------------------------------------------------------
* build the list
*-------------------------------------------------------------------------
*/
- trav_table_init(&table);
+ trav_table_init( &table );
curr1 = 0;
curr2 = 0;
- while(curr1 < info1->nused && curr2 < info2->nused) {
+ while(curr1 < info1->nused && curr2 < info2->nused)
+ {
/* criteria is string compare */
int cmp = HDstrcmp(info1->paths[curr1].path, info2->paths[curr2].path);
@@ -363,13 +386,15 @@ hsize_t diff_match(hid_t file1_id,
curr1++;
curr2++;
} /* end if */
- else if(cmp < 0) {
+ else if(cmp < 0)
+ {
infile[0] = 1;
infile[1] = 0;
trav_table_addflags(infile, info1->paths[curr1].path, info1->paths[curr1].type, table);
curr1++;
} /* end else-if */
- else {
+ else
+ {
infile[0] = 0;
infile[1] = 1;
trav_table_addflags(infile, info2->paths[curr2].path, info2->paths[curr2].type, table);
@@ -380,7 +405,8 @@ hsize_t diff_match(hid_t file1_id,
/* list1 did not end */
infile[0] = 1;
infile[1] = 0;
- while(curr1 < info1->nused) {
+ while(curr1 < info1->nused)
+ {
trav_table_addflags(infile, info1->paths[curr1].path, info1->paths[curr1].type, table);
curr1++;
} /* end while */
@@ -388,16 +414,18 @@ hsize_t diff_match(hid_t file1_id,
/* list2 did not end */
infile[0] = 0;
infile[1] = 1;
- while(curr2 < info2->nused) {
+ while(curr2 < info2->nused)
+ {
trav_table_addflags(infile, info2->paths[curr2].path, info2->paths[curr2].type, table);
curr2++;
} /* end while */
- /*-------------------------------------------------------------------------
+ /*-------------------------------------------------------------------------
* print the list
*-------------------------------------------------------------------------
*/
- if(options->m_verbose) {
+ if(options->m_verbose)
+ {
printf("\n");
printf("file1 file2\n");
printf("---------------------------------------\n");
@@ -412,6 +440,35 @@ hsize_t diff_match(hid_t file1_id,
} /* end if */
+
+ /*-------------------------------------------------------------------------
+ * contents mode. we do an "absolute" compare criteria, the number of objects
+ * in file1 must be the same as in file2
+ *-------------------------------------------------------------------------
+ */
+ if ( options->m_contents )
+ {
+ /* assume equal contents initially */
+ options->contents = 1;
+
+ /* number of different objects */
+ if ( info1->nused != info2->nused )
+ {
+ options->contents = 0;
+ }
+
+
+ for( i = 0; i < table->nobjs; i++)
+ {
+ if( table->objs[i].flags[0] != table->objs[i].flags[1] )
+ {
+ options->contents = 0;
+ }
+ }
+
+ }
+
+
/*-------------------------------------------------------------------------
* do the diff for common objects
*-------------------------------------------------------------------------
@@ -430,17 +487,21 @@ hsize_t diff_match(hid_t file1_id,
HDmemset(workerTasks, 1, (g_nTasks - 1));
#endif
- for(i = 0; i < table->nobjs; i++) {
- if(table->objs[i].flags[0] && table->objs[i].flags[1]) {
+ for(i = 0; i < table->nobjs; i++)
+ {
+ if( table->objs[i].flags[0] && table->objs[i].flags[1])
+ {
options->cmn_objs = 1;
- if(!g_Parallel) {
+ if(!g_Parallel)
+ {
nfound += diff(file1_id,
table->objs[i].name,
file2_id,
table->objs[i].name, options, table->objs[i].type);
} /* end if */
#ifdef H5_HAVE_PARALLEL
- else {
+ else
+ {
int workerFound = 0;
h5diffdebug("beginning of big else block\n");
@@ -453,7 +514,8 @@ hsize_t diff_match(hid_t file1_id,
*/
/*Set up args to pass to worker task. */
- if(HDstrlen(table->objs[i].name) > 255) {
+ if(HDstrlen(table->objs[i].name) > 255)
+ {
printf("The parallel diff only supports object names up to 255 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
@@ -464,14 +526,16 @@ hsize_t diff_match(hid_t file1_id,
h5diffdebug2("busyTasks=%d\n", busyTasks);
/* if there are any outstanding print requests, let's handle one. */
- if(busyTasks > 0) {
+ if(busyTasks > 0)
+ {
int incomingMessage;
/* check if any tasks freed up, and didn't need to print. */
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &incomingMessage, &Status);
/* first block*/
- if(incomingMessage) {
+ if(incomingMessage)
+ {
workerTasks[Status.MPI_SOURCE - 1] = 1;
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
@@ -480,7 +544,8 @@ hsize_t diff_match(hid_t file1_id,
} /* end if */
/* check to see if the print token was returned. */
- if(!havePrintToken) {
+ if(!havePrintToken)
+ {
/* If we don't have the token, someone is probably sending us output */
print_incoming_data();
@@ -499,10 +564,12 @@ hsize_t diff_match(hid_t file1_id,
} /* end if */
/* check to see if anyone needs the print token. */
- if(havePrintToken) {
+ if(havePrintToken)
+ {
/* check incoming queue for print token requests */
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &incomingMessage, &Status);
- if(incomingMessage) {
+ if(incomingMessage)
+ {
MPI_Recv(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &Status);
MPI_Send(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD);
havePrintToken = 0;
@@ -513,8 +580,10 @@ hsize_t diff_match(hid_t file1_id,
/* check array of tasks to see which ones are free.
* Manager task never does work, so freeTasks[0] is really
* worker task 0. */
- for(n = 1; (n < g_nTasks) && !workerFound; n++) {
- if(workerTasks[n-1]) {
+ for(n = 1; (n < g_nTasks) && !workerFound; n++)
+ {
+ if(workerTasks[n-1])
+ {
/* send file id's and names to first free worker */
MPI_Send(&args, sizeof(args), MPI_BYTE, n, MPI_TAG_ARGS, MPI_COMM_WORLD);
@@ -528,20 +597,24 @@ hsize_t diff_match(hid_t file1_id,
} /* end for */
h5diffdebug2("workerfound is %d \n", workerFound);
- if(!workerFound) {
+ if(!workerFound)
+ {
/* if they were all busy, we've got to wait for one free up
* before we can move on. If we don't have the token, some
* task is currently printing so we'll wait for that task to
* return it.
*/
- if(!havePrintToken) {
- while(!havePrintToken) {
+ if(!havePrintToken)
+ {
+ while(!havePrintToken)
+ {
int incomingMessage;
print_incoming_data();
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &incomingMessage, &Status);
- if(incomingMessage) {
+ if(incomingMessage)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status);
havePrintToken = 1;
nfound += nFoundbyWorker.nfound;
@@ -552,23 +625,27 @@ hsize_t diff_match(hid_t file1_id,
} /* end while */
} /* end if */
/* if we do have the token, check for task to free up, or wait for a task to request it */
- else {
+ else
+ {
/* But first print all the data in our incoming queue */
print_incoming_data();
MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &Status);
- if(Status.MPI_TAG == MPI_TAG_DONE) {
+ if(Status.MPI_TAG == MPI_TAG_DONE)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
} /* end if */
- else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) {
+ else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST)
+ {
int incomingMessage;
MPI_Recv(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &Status);
MPI_Send(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD);
- do {
+ do
+ {
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &incomingMessage, &Status);
print_incoming_data();
@@ -579,7 +656,8 @@ hsize_t diff_match(hid_t file1_id,
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
} /* end else-if */
- else {
+ else
+ {
printf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
MPI_Finalize();
@@ -593,26 +671,32 @@ hsize_t diff_match(hid_t file1_id,
h5diffdebug("done with for loop\n");
#ifdef H5_HAVE_PARALLEL
- if(g_Parallel) {
+ if(g_Parallel)
+ {
/* make sure all tasks are done */
- while(busyTasks > 0) {
+ while(busyTasks > 0)
+ {
MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &Status);
- if(Status.MPI_TAG == MPI_TAG_DONE) {
+ if(Status.MPI_TAG == MPI_TAG_DONE)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
busyTasks--;
} /* end if */
- else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN) {
+ else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
busyTasks--;
havePrintToken = 1;
} /* end else-if */
- else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) {
+ else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST)
+ {
MPI_Recv(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &Status);
- if(havePrintToken) {
+ if(havePrintToken)
+ {
int incomingMessage;
MPI_Send(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD);
@@ -629,11 +713,13 @@ hsize_t diff_match(hid_t file1_id,
busyTasks--;
} /* end if */
/* someone else must have it...wait for them to return it, then give it to the task that just asked for it. */
- else {
+ else
+ {
int source = Status.MPI_SOURCE;
int incomingMessage;
- do {
+ do
+ {
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &incomingMessage, &Status);
print_incoming_data();
@@ -647,7 +733,8 @@ hsize_t diff_match(hid_t file1_id,
MPI_Send(NULL, 0, MPI_BYTE, source, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD);
} /* end else */
} /* end else-if */
- else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN) {
+ else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
@@ -663,7 +750,8 @@ hsize_t diff_match(hid_t file1_id,
printf("%s", data);
} /* end else-if */
- else {
+ else
+ {
printf("ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end else */
@@ -702,59 +790,64 @@ hsize_t diff_match(hid_t file1_id,
*-------------------------------------------------------------------------
*/
-hsize_t diff_compare (hid_t file1_id,
- const char *file1_name,
- const char *obj1_name,
- trav_info_t * info1,
- hid_t file2_id,
- const char *file2_name,
- const char *obj2_name,
- trav_info_t * info2,
- diff_opt_t * options)
+hsize_t diff_compare(hid_t file1_id,
+ const char *file1_name,
+ const char *obj1_name,
+ trav_info_t *info1,
+ hid_t file2_id,
+ const char *file2_name,
+ const char *obj2_name,
+ trav_info_t *info2,
+ diff_opt_t *options)
{
- int f1 = 0, f2 = 0;
- hsize_t nfound = 0;
-
- ssize_t i = h5trav_getindex (info1, obj1_name);
- ssize_t j = h5trav_getindex (info2, obj2_name);
-
- if (i == -1)
- {
- parallel_print ("Object <%s> could not be found in <%s>\n", obj1_name,
- file1_name);
- f1 = 1;
- }
- if (j == -1)
- {
- parallel_print ("Object <%s> could not be found in <%s>\n", obj2_name,
- file2_name);
- f2 = 1;
- }
- if (f1 || f2)
- {
- options->err_stat = 1;
- return 0;
- }
-
- /* use the name with "/" first, as obtained by iterator function */
- obj1_name = info1->paths[i].path;
- obj2_name = info2->paths[j].path;
-
- /* objects are not the same type */
- if (info1->paths[i].type != info2->paths[j].type)
- {
- if (options->m_verbose)
- parallel_print("Comparison not possible: <%s> is of type %s and <%s> is of type %s\n",
- obj1_name, get_type(info1->paths[i].type), obj2_name,
- get_type(info2->paths[j].type));
- options->not_cmp=1;
- return 0;
- }
-
- nfound =
- diff (file1_id, obj1_name, file2_id, obj2_name, options, info1->paths[i].type);
-
- return nfound;
+ int f1 = 0;
+ int f2 = 0;
+ hsize_t nfound = 0;
+
+ ssize_t i = h5trav_getindex (info1, obj1_name);
+ ssize_t j = h5trav_getindex (info2, obj2_name);
+
+ if (i == -1)
+ {
+ parallel_print ("Object <%s> could not be found in <%s>\n", obj1_name,
+ file1_name);
+ f1 = 1;
+ }
+ if (j == -1)
+ {
+ parallel_print ("Object <%s> could not be found in <%s>\n", obj2_name,
+ file2_name);
+ f2 = 1;
+ }
+ if (f1 || f2)
+ {
+ options->err_stat = 1;
+ return 0;
+ }
+
+ /* use the name with "/" first, as obtained by iterator function */
+ obj1_name = info1->paths[i].path;
+ obj2_name = info2->paths[j].path;
+
+ /* objects are not the same type */
+ if (info1->paths[i].type != info2->paths[j].type)
+ {
+ if (options->m_verbose)
+ parallel_print("Comparison not possible: <%s> is of type %s and <%s> is of type %s\n",
+ obj1_name, get_type(info1->paths[i].type), obj2_name,
+ get_type(info2->paths[j].type));
+ options->not_cmp=1;
+ return 0;
+ }
+
+ nfound = diff(file1_id,
+ obj1_name,
+ file2_id,
+ obj2_name,
+ options,
+ info1->paths[i].type);
+
+ return nfound;
}
@@ -784,14 +877,15 @@ hsize_t diff(hid_t file1_id,
diff_opt_t * options,
h5trav_type_t type)
{
- hid_t type1_id = (-1);
- hid_t type2_id = (-1);
- hid_t grp1_id = (-1);
- hid_t grp2_id = (-1);
- int ret;
+ hid_t type1_id = (-1);
+ hid_t type2_id = (-1);
+ hid_t grp1_id = (-1);
+ hid_t grp2_id = (-1);
+ int ret;
hsize_t nfound = 0;
- switch(type) {
+ switch(type)
+ {
/*-------------------------------------------------------------------------
* H5TRAV_TYPE_DATASET
*-------------------------------------------------------------------------
@@ -801,7 +895,8 @@ hsize_t diff(hid_t file1_id,
* verbose, always print name
*-------------------------------------------------------------------------
*/
- if(options->m_verbose) {
+ if(options->m_verbose)
+ {
if(print_objname(options, (hsize_t)1))
do_print_objname("dataset", path1, path2);
nfound = diff_dataset(file1_id, file2_id, path1, path2, options);
@@ -813,15 +908,18 @@ hsize_t diff(hid_t file1_id,
* disabling quiet mode
*-------------------------------------------------------------------------
*/
- else {
- if(options->m_quiet == 0) {
+ else
+ {
+ if(options->m_quiet == 0)
+ {
/* shut up temporarily */
options->m_quiet = 1;
nfound = diff_dataset(file1_id, file2_id, path1, path2, options);
/* print again */
options->m_quiet = 0;
- if(nfound) {
+ if(nfound)
+ {
if(print_objname(options,nfound))
do_print_objname("dataset", path1, path2);
nfound = diff_dataset(file1_id, file2_id, path1, path2, options);