mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r17981] Description:
Abstract "print header" code into separate routine. Tested on: Mac OS X/32 10.6.2 (amazon) w/debug (too minor to require h5committest)
This commit is contained in:
parent
34d14bdf89
commit
037dac6997
@ -5809,6 +5809,51 @@ int print_data(diff_opt_t *options)
|
|||||||
return ( (options->m_report || options->m_verbose) && !options->m_quiet)?1:0;
|
return ( (options->m_report || options->m_verbose) && !options->m_quiet)?1:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Function: print_header
|
||||||
|
*
|
||||||
|
* Purpose: print header for difference
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
static
|
||||||
|
void print_header(int pp, /* print percentage */
|
||||||
|
int rank,
|
||||||
|
hsize_t *dims,
|
||||||
|
const char *obj1,
|
||||||
|
const char *obj2 )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* print header */
|
||||||
|
parallel_print("%-16s","size:");
|
||||||
|
print_dimensions (rank,dims);
|
||||||
|
parallel_print("%-11s","");
|
||||||
|
print_dimensions (rank,dims);
|
||||||
|
parallel_print("\n");
|
||||||
|
|
||||||
|
if (pp)
|
||||||
|
{
|
||||||
|
parallel_print("%-15s %-15s %-15s %-15s %-15s\n",
|
||||||
|
"position",
|
||||||
|
(obj1!=NULL) ? obj1 : " ",
|
||||||
|
(obj2!=NULL) ? obj2 : " ",
|
||||||
|
"difference",
|
||||||
|
"relative");
|
||||||
|
parallel_print("------------------------------------------------------------------------\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parallel_print("%-15s %-15s %-15s %-20s\n",
|
||||||
|
"position",
|
||||||
|
(obj1!=NULL) ? obj1 : " ",
|
||||||
|
(obj2!=NULL) ? obj2 : " ",
|
||||||
|
"difference");
|
||||||
|
parallel_print("------------------------------------------------------------\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
* Function: print_pos
|
* Function: print_pos
|
||||||
*
|
*
|
||||||
@ -5835,31 +5880,7 @@ void print_pos( int *ph, /* print header */
|
|||||||
{
|
{
|
||||||
*ph=0;
|
*ph=0;
|
||||||
|
|
||||||
parallel_print("%-16s","size:");
|
print_header(pp, rank, dims, obj1, obj2);
|
||||||
print_dimensions (rank,dims);
|
|
||||||
parallel_print("%-11s","");
|
|
||||||
print_dimensions (rank,dims);
|
|
||||||
parallel_print("\n");
|
|
||||||
|
|
||||||
if (pp)
|
|
||||||
{
|
|
||||||
parallel_print("%-15s %-15s %-15s %-15s %-15s\n",
|
|
||||||
"position",
|
|
||||||
(obj1!=NULL) ? obj1 : " ",
|
|
||||||
(obj2!=NULL) ? obj2 : " ",
|
|
||||||
"difference",
|
|
||||||
"relative");
|
|
||||||
parallel_print("------------------------------------------------------------------------\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
parallel_print("%-15s %-15s %-15s %-20s\n",
|
|
||||||
"position",
|
|
||||||
(obj1!=NULL) ? obj1 : " ",
|
|
||||||
(obj2!=NULL) ? obj2 : " ",
|
|
||||||
"difference");
|
|
||||||
parallel_print("------------------------------------------------------------\n");
|
|
||||||
}
|
|
||||||
} /* end print header */
|
} /* end print header */
|
||||||
|
|
||||||
for ( i = 0; i < rank; i++)
|
for ( i = 0; i < rank; i++)
|
||||||
@ -5912,31 +5933,7 @@ void print_char_pos( int *ph, /* print header */
|
|||||||
{
|
{
|
||||||
*ph=0;
|
*ph=0;
|
||||||
|
|
||||||
parallel_print("%-16s","size:");
|
print_header(pp, rank, dims, obj1, obj2);
|
||||||
print_dimensions (rank,dims);
|
|
||||||
parallel_print("%-11s","");
|
|
||||||
print_dimensions (rank,dims);
|
|
||||||
parallel_print("\n");
|
|
||||||
|
|
||||||
if (pp)
|
|
||||||
{
|
|
||||||
parallel_print("%-15s %-15s %-15s %-15s %-15s\n",
|
|
||||||
"position",
|
|
||||||
(obj1!=NULL) ? obj1 : " ",
|
|
||||||
(obj2!=NULL) ? obj2 : " ",
|
|
||||||
"difference",
|
|
||||||
"relative");
|
|
||||||
parallel_print("------------------------------------------------------------------------\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
parallel_print("%-15s %-15s %-15s %-20s\n",
|
|
||||||
"position",
|
|
||||||
(obj1!=NULL) ? obj1 : " ",
|
|
||||||
(obj2!=NULL) ? obj2 : " ",
|
|
||||||
"difference");
|
|
||||||
parallel_print("------------------------------------------------------------\n");
|
|
||||||
}
|
|
||||||
} /* end print header */
|
} /* end print header */
|
||||||
|
|
||||||
for ( i = 0; i < rank; i++)
|
for ( i = 0; i < rank; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user