summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_array.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2009-02-18 20:05:49 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2009-02-18 20:05:49 (GMT)
commitc880943ce9d588a58aecebeb7d2ecf978e02616b (patch)
treef3e499ba6b61c4fe4af43d4787d59b203b444da5 /tools/lib/h5diff_array.c
parent61346d50fab0dbaadd313e46cc968d4e4ad26c82 (diff)
downloadhdf5-c880943ce9d588a58aecebeb7d2ecf978e02616b.zip
hdf5-c880943ce9d588a58aecebeb7d2ecf978e02616b.tar.gz
hdf5-c880943ce9d588a58aecebeb7d2ecf978e02616b.tar.bz2
[svn-r16490] Fixed bug #1459 by eliminating the macro long_long and replacing all instances with long long.
Tested: h5comittest fedora 10 x64 XP32, VNET
Diffstat (limited to 'tools/lib/h5diff_array.c')
-rw-r--r--tools/lib/h5diff_array.c114
1 files changed, 57 insertions, 57 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index ba5a15e..97880da 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -139,7 +139,7 @@ static int not_comparable;
*/
static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id,hid_t region1_id, hid_t region2_id, diff_opt_t *options);
static hbool_t all_zero(const void *_mem, size_t size);
-static int ull2float(unsigned long_long ull_value, float *f_value);
+static int ull2float(unsigned long long ull_value, float *f_value);
static hsize_t character_compare(unsigned char *mem1,unsigned char *mem2,hsize_t i,unsigned u,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph);
static hsize_t character_compare_opt(unsigned char *mem1,unsigned char *mem2,hsize_t i,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph);
static hbool_t equal_float(float value, float expected, diff_opt_t *options);
@@ -357,9 +357,9 @@ hsize_t diff_array( void *_mem1,
* H5T_COMPOUND
* Recursively call this function for each member
* H5T_ARRAY
- * Recursively call this function for each element 
+ * Recursively call this function for each element�
* H5T_VLEN
- * Recursively call this function for each element 
+ * Recursively call this function for each element�
* H5T_STRING
* compare byte by byte in a cycle from 0 to type_size. this type_size is the
* value obtained by the get_size function but it is the string lenght for
@@ -1589,12 +1589,12 @@ hsize_t diff_datum(void *_mem1,
else if (H5Tequal(m_type, H5T_NATIVE_LLONG))
{
- long_long temp1_llong;
- long_long temp2_llong;
- assert(type_size==sizeof(long_long));
+ long long temp1_llong;
+ long long temp2_llong;
+ assert(type_size==sizeof(long long));
- memcpy(&temp1_llong, mem1, sizeof(long_long));
- memcpy(&temp2_llong, mem2, sizeof(long_long));
+ memcpy(&temp1_llong, mem1, sizeof(long long));
+ memcpy(&temp2_llong, mem2, sizeof(long long));
/* -d and !-p */
if (options->d && !options->p)
{
@@ -1687,16 +1687,16 @@ hsize_t diff_datum(void *_mem1,
else if (H5Tequal(m_type, H5T_NATIVE_ULLONG))
{
- unsigned long_long temp1_ullong;
- unsigned long_long temp2_ullong;
- assert(type_size==sizeof(unsigned long_long));
+ unsigned long long temp1_ullong;
+ unsigned long long temp2_ullong;
+ assert(type_size==sizeof(unsigned long long));
- memcpy(&temp1_ullong, mem1, sizeof(unsigned long_long));
- memcpy(&temp2_ullong, mem2, sizeof(unsigned long_long));
+ memcpy(&temp1_ullong, mem1, sizeof(unsigned long long));
+ memcpy(&temp2_ullong, mem2, sizeof(unsigned long long));
/* -d and !-p */
if (options->d && !options->p)
{
- if ( PDIFF(temp1_ullong,temp2_ullong) > (unsigned long_long)options->delta)
+ if ( PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long)options->delta)
{
if ( print_data(options) )
{
@@ -1759,7 +1759,7 @@ hsize_t diff_datum(void *_mem1,
else
- if ( per > options->percent && PDIFF(temp1_ullong,temp2_ullong) > (unsigned long_long)options->delta )
+ if ( per > options->percent && PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long)options->delta )
{
if ( print_data(options) )
@@ -4778,8 +4778,8 @@ hsize_t diff_llong(unsigned char *mem1,
{
hsize_t nfound=0; /* number of differences found */
- long_long temp1_llong;
- long_long temp2_llong;
+ long long temp1_llong;
+ long long temp2_llong;
hsize_t i;
double per;
int both_zero;
@@ -4790,8 +4790,8 @@ hsize_t diff_llong(unsigned char *mem1,
for ( i = 0; i < nelmts; i++)
{
- memcpy(&temp1_llong, mem1, sizeof(long_long));
- memcpy(&temp2_llong, mem2, sizeof(long_long));
+ memcpy(&temp1_llong, mem1, sizeof(long long));
+ memcpy(&temp2_llong, mem2, sizeof(long long));
if (ABS( temp1_llong-temp2_llong) > options->delta)
{
@@ -4803,8 +4803,8 @@ hsize_t diff_llong(unsigned char *mem1,
}
nfound++;
}
- mem1+=sizeof(long_long);
- mem2+=sizeof(long_long);
+ mem1+=sizeof(long long);
+ mem2+=sizeof(long long);
if (options->n && nfound>=options->count)
return nfound;
}
@@ -4817,8 +4817,8 @@ hsize_t diff_llong(unsigned char *mem1,
for ( i = 0; i < nelmts; i++)
{
- memcpy(&temp1_llong, mem1, sizeof(long_long));
- memcpy(&temp2_llong, mem2, sizeof(long_long));
+ memcpy(&temp1_llong, mem1, sizeof(long long));
+ memcpy(&temp2_llong, mem2, sizeof(long long));
PER(temp1_llong,temp2_llong);
@@ -4845,8 +4845,8 @@ hsize_t diff_llong(unsigned char *mem1,
}
nfound++;
}
- mem1+=sizeof(long_long);
- mem2+=sizeof(long_long);
+ mem1+=sizeof(long long);
+ mem2+=sizeof(long long);
if (options->n && nfound>=options->count)
return nfound;
}
@@ -4860,8 +4860,8 @@ hsize_t diff_llong(unsigned char *mem1,
for ( i = 0; i < nelmts; i++)
{
- memcpy(&temp1_llong, mem1, sizeof(long_long));
- memcpy(&temp2_llong, mem2, sizeof(long_long));
+ memcpy(&temp1_llong, mem1, sizeof(long long));
+ memcpy(&temp2_llong, mem2, sizeof(long long));
PER(temp1_llong,temp2_llong);
@@ -4888,8 +4888,8 @@ hsize_t diff_llong(unsigned char *mem1,
}
nfound++;
}
- mem1+=sizeof(long_long);
- mem2+=sizeof(long_long);
+ mem1+=sizeof(long long);
+ mem2+=sizeof(long long);
if (options->n && nfound>=options->count)
return nfound;
}
@@ -4900,8 +4900,8 @@ hsize_t diff_llong(unsigned char *mem1,
for ( i = 0; i < nelmts; i++)
{
- memcpy(&temp1_llong, mem1, sizeof(long_long));
- memcpy(&temp2_llong, mem2, sizeof(long_long));
+ memcpy(&temp1_llong, mem1, sizeof(long long));
+ memcpy(&temp2_llong, mem2, sizeof(long long));
if (temp1_llong != temp2_llong)
{
@@ -4914,8 +4914,8 @@ hsize_t diff_llong(unsigned char *mem1,
nfound++;
}
- mem1+=sizeof(long_long);
- mem2+=sizeof(long_long);
+ mem1+=sizeof(long long);
+ mem2+=sizeof(long long);
if (options->n && nfound>=options->count)
return nfound;
} /* nelmts */
@@ -4951,8 +4951,8 @@ hsize_t diff_ullong(unsigned char *mem1,
{
hsize_t nfound=0; /* number of differences found */
- unsigned long_long temp1_ullong;
- unsigned long_long temp2_ullong;
+ unsigned long long temp1_ullong;
+ unsigned long long temp2_ullong;
hsize_t i;
float f1, f2;
double per;
@@ -4964,10 +4964,10 @@ hsize_t diff_ullong(unsigned char *mem1,
for ( i = 0; i < nelmts; i++)
{
- memcpy(&temp1_ullong, mem1, sizeof(unsigned long_long));
- memcpy(&temp2_ullong, mem2, sizeof(unsigned long_long));
+ memcpy(&temp1_ullong, mem1, sizeof(unsigned long long));
+ memcpy(&temp2_ullong, mem2, sizeof(unsigned long long));
- if ( PDIFF(temp1_ullong,temp2_ullong) > (unsigned long_long) options->delta)
+ if ( PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) options->delta)
{
if ( print_data(options) )
{
@@ -4977,8 +4977,8 @@ hsize_t diff_ullong(unsigned char *mem1,
}
nfound++;
}
- mem1+=sizeof(unsigned long_long);
- mem2+=sizeof(unsigned long_long);
+ mem1+=sizeof(unsigned long long);
+ mem2+=sizeof(unsigned long long);
if (options->n && nfound>=options->count)
return nfound;
}
@@ -4991,8 +4991,8 @@ hsize_t diff_ullong(unsigned char *mem1,
for ( i = 0; i < nelmts; i++)
{
- memcpy(&temp1_ullong, mem1, sizeof(unsigned long_long));
- memcpy(&temp2_ullong, mem2, sizeof(unsigned long_long));
+ memcpy(&temp1_ullong, mem1, sizeof(unsigned long long));
+ memcpy(&temp2_ullong, mem2, sizeof(unsigned long long));
ull2float(temp1_ullong,&f1);
ull2float(temp2_ullong,&f2);
@@ -5021,8 +5021,8 @@ hsize_t diff_ullong(unsigned char *mem1,
}
nfound++;
}
- mem1+=sizeof(unsigned long_long);
- mem2+=sizeof(unsigned long_long);
+ mem1+=sizeof(unsigned long long);
+ mem2+=sizeof(unsigned long long);
if (options->n && nfound>=options->count)
return nfound;
}
@@ -5036,8 +5036,8 @@ hsize_t diff_ullong(unsigned char *mem1,
for ( i = 0; i < nelmts; i++)
{
- memcpy(&temp1_ullong, mem1, sizeof(unsigned long_long));
- memcpy(&temp2_ullong, mem2, sizeof(unsigned long_long));
+ memcpy(&temp1_ullong, mem1, sizeof(unsigned long long));
+ memcpy(&temp2_ullong, mem2, sizeof(unsigned long long));
ull2float(temp1_ullong,&f1);
ull2float(temp2_ullong,&f2);
@@ -5056,7 +5056,7 @@ hsize_t diff_ullong(unsigned char *mem1,
else
- if ( per > options->percent && PDIFF(temp1_ullong,temp2_ullong) > (unsigned long_long)options->delta )
+ if ( per > options->percent && PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long)options->delta )
{
if ( print_data(options) )
{
@@ -5066,8 +5066,8 @@ hsize_t diff_ullong(unsigned char *mem1,
}
nfound++;
}
- mem1+=sizeof(unsigned long_long);
- mem2+=sizeof(unsigned long_long);
+ mem1+=sizeof(unsigned long long);
+ mem2+=sizeof(unsigned long long);
if (options->n && nfound>=options->count)
return nfound;
}
@@ -5078,8 +5078,8 @@ hsize_t diff_ullong(unsigned char *mem1,
for ( i = 0; i < nelmts; i++)
{
- memcpy(&temp1_ullong, mem1, sizeof(unsigned long_long));
- memcpy(&temp2_ullong, mem2, sizeof(unsigned long_long));
+ memcpy(&temp1_ullong, mem1, sizeof(unsigned long long));
+ memcpy(&temp2_ullong, mem2, sizeof(unsigned long long));
if (temp1_ullong != temp2_ullong)
{
@@ -5092,8 +5092,8 @@ hsize_t diff_ullong(unsigned char *mem1,
nfound++;
}
- mem1+=sizeof(unsigned long_long);
- mem2+=sizeof(unsigned long_long);
+ mem1+=sizeof(unsigned long long);
+ mem2+=sizeof(unsigned long long);
if (options->n && nfound>=options->count)
return nfound;
} /* nelmts */
@@ -5108,7 +5108,7 @@ hsize_t diff_ullong(unsigned char *mem1,
/*-------------------------------------------------------------------------
* Function: ull2float
*
- * Purpose: convert unsigned long_long to float
+ * Purpose: convert unsigned long long to float
*
* Programmer: pvn
* Mar 22, 2006
@@ -5118,7 +5118,7 @@ hsize_t diff_ullong(unsigned char *mem1,
*-------------------------------------------------------------------------
*/
static
-int ull2float(unsigned long_long ull_value, float *f_value)
+int ull2float(unsigned long long ull_value, float *f_value)
{
hid_t dxpl_id;
unsigned char *buf;
@@ -5574,7 +5574,7 @@ void print_pos( int *ph, /* print header */
parallel_print("[ " );
for ( i = 0; i < rank; i++)
{
- parallel_print(HSIZE_T_FORMAT, (unsigned long_long)pos[i]);
+ parallel_print(HSIZE_T_FORMAT, (unsigned long long)pos[i]);
parallel_print(" ");
}
parallel_print("]" );
@@ -5652,7 +5652,7 @@ void print_char_pos( int *ph, /* print header */
for ( i = 0; i < rank; i++)
{
- parallel_print(HSIZE_T_FORMAT, (unsigned long_long)pos[i]);
+ parallel_print(HSIZE_T_FORMAT, (unsigned long long)pos[i]);
parallel_print(" ");
}