diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2009-02-18 20:05:49 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2009-02-18 20:05:49 (GMT) |
commit | c880943ce9d588a58aecebeb7d2ecf978e02616b (patch) | |
tree | f3e499ba6b61c4fe4af43d4787d59b203b444da5 /tools/lib | |
parent | 61346d50fab0dbaadd313e46cc968d4e4ad26c82 (diff) | |
download | hdf5-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')
-rw-r--r-- | tools/lib/h5diff_array.c | 114 | ||||
-rw-r--r-- | tools/lib/h5diff_util.c | 2 | ||||
-rw-r--r-- | tools/lib/h5tools.c | 12 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 12 |
4 files changed, 70 insertions, 70 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(" "); } diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 1fdbed3..2fb789d 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -372,7 +372,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 281e3e6..8f2672e 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1556,8 +1556,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; @@ -1723,7 +1723,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 @@ -1733,7 +1733,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 @@ -1765,7 +1765,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 @@ -1798,7 +1798,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) { |