summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2009-02-18 20:02:05 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2009-02-18 20:02:05 (GMT)
commit5d69e87ff0f4a4c3ce72b69a944b73b46b5c2b7c (patch)
tree6bfe2263c050603e228fb929ad236a5069c11fae /tools/lib
parent85dc39846e418b7abd0e0b951f52d474a82eac80 (diff)
downloadhdf5-5d69e87ff0f4a4c3ce72b69a944b73b46b5c2b7c.zip
hdf5-5d69e87ff0f4a4c3ce72b69a944b73b46b5c2b7c.tar.gz
hdf5-5d69e87ff0f4a4c3ce72b69a944b73b46b5c2b7c.tar.bz2
[svn-r16489] Fixed bug #1459 by eliminating the macro long_long and replacing all instances with long long.
Tested: h5comittest fedora 10 x64 Vista 32, VS2005, IVF101 XP32, Cygwin
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5diff_array.c114
-rw-r--r--tools/lib/h5diff_util.c2
-rw-r--r--tools/lib/h5tools.c12
-rw-r--r--tools/lib/h5tools_str.c12
4 files changed, 70 insertions, 70 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index f9c6261..5d57a52 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -138,7 +138,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);
@@ -356,9 +356,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
@@ -1588,12 +1588,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)
{
@@ -1686,16 +1686,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) )
{
@@ -1758,7 +1758,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) )
@@ -4777,8 +4777,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;
@@ -4789,8 +4789,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)
{
@@ -4802,8 +4802,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;
}
@@ -4816,8 +4816,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);
@@ -4844,8 +4844,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;
}
@@ -4859,8 +4859,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);
@@ -4887,8 +4887,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;
}
@@ -4899,8 +4899,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)
{
@@ -4913,8 +4913,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 */
@@ -4950,8 +4950,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;
@@ -4963,10 +4963,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) )
{
@@ -4976,8 +4976,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;
}
@@ -4990,8 +4990,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);
@@ -5020,8 +5020,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;
}
@@ -5035,8 +5035,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);
@@ -5055,7 +5055,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) )
{
@@ -5065,8 +5065,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;
}
@@ -5077,8 +5077,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)
{
@@ -5091,8 +5091,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 */
@@ -5107,7 +5107,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
@@ -5117,7 +5117,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;
@@ -5573,7 +5573,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("]" );
@@ -5651,7 +5651,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(" ");
}
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index 35f4dfb..1acc493 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -371,7 +371,7 @@ get_class(H5T_class_t tclass)
void print_found(hsize_t nfound)
{
if(g_Parallel)
- parallel_print("%"H5_PRINTF_LL_WIDTH"u differences found\n", (unsigned long_long)nfound);
+ parallel_print("%"H5_PRINTF_LL_WIDTH"u differences found\n", (unsigned long long)nfound);
else
HDfprintf(stdout,"%Hu differences found\n",nfound);
}
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 52d65fe..6032c02 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1559,8 +1559,8 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
size_t size; /* datum size */
float tempfloat;
double tempdouble;
- unsigned long_long tempullong;
- long_long templlong;
+ unsigned long long tempullong;
+ long long templlong;
unsigned long tempulong;
long templong;
unsigned int tempuint;
@@ -1726,7 +1726,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
}
else if (H5Tequal(tid, H5T_NATIVE_LLONG))
{
- memcpy(&templlong, mem, sizeof(long_long));
+ memcpy(&templlong, mem, sizeof(long long));
#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, fmt_llong, templlong);
#else
@@ -1736,7 +1736,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
}
else if (H5Tequal(tid, H5T_NATIVE_ULLONG))
{
- memcpy(&tempullong, mem, sizeof(unsigned long_long));
+ memcpy(&tempullong, mem, sizeof(unsigned long long));
#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, fmt_ullong, tempullong);
#else
@@ -1768,7 +1768,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
}
else
{
- memcpy(&templlong, mem, sizeof(long_long));
+ memcpy(&templlong, mem, sizeof(long long));
#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, fmt_llong, templlong);
#else
@@ -1801,7 +1801,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
}
else
{
- memcpy(&tempullong, mem, sizeof(unsigned long_long));
+ memcpy(&tempullong, mem, sizeof(unsigned long long));
#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, fmt_ullong, tempullong);
#else
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 5d42307..a339acf 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -586,8 +586,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
* some tempvars to store the value before we append it to the string to
* get rid of the memory alignment problem
*/
- unsigned long_long tempullong;
- long_long templlong;
+ unsigned long long tempullong;
+ long long templlong;
unsigned long tempulong;
long templong;
unsigned int tempuint;
@@ -737,10 +737,10 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
HDmemcpy(&tempulong, vp, sizeof(unsigned long));
h5tools_str_append(str, OPT(info->fmt_ulong, "%lu"), tempulong);
} else if (H5Tequal(type, H5T_NATIVE_LLONG)) {
- HDmemcpy(&templlong, vp, sizeof(long_long));
+ HDmemcpy(&templlong, vp, sizeof(long long));
h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong);
} else if (H5Tequal(type, H5T_NATIVE_ULLONG)) {
- HDmemcpy(&tempullong, vp, sizeof(unsigned long_long));
+ HDmemcpy(&tempullong, vp, sizeof(unsigned long long));
h5tools_str_append(str, OPT(info->fmt_ullong, fmt_ullong), tempullong);
} else if (H5Tequal(type, H5T_NATIVE_HSSIZE)) {
if (sizeof(hssize_t) == sizeof(int)) {
@@ -750,7 +750,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
memcpy(&templong, vp, sizeof(long));
h5tools_str_append(str, OPT(info->fmt_long, "%ld"), templong);
} else {
- memcpy(&templlong, vp, sizeof(long_long));
+ memcpy(&templlong, vp, sizeof(long long));
h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong);
}
} else if (H5Tequal(type, H5T_NATIVE_HSIZE)) {
@@ -761,7 +761,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
memcpy(&tempulong, vp, sizeof(long));
h5tools_str_append(str, OPT(info->fmt_ulong, "%lu"), tempulong);
} else {
- memcpy(&tempullong, vp, sizeof(unsigned long_long));
+ memcpy(&tempullong, vp, sizeof(unsigned long long));
h5tools_str_append(str, OPT(info->fmt_ullong, fmt_ullong), tempullong);
}
} else if (H5Tget_class(type) == H5T_COMPOUND) {