diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
commit | 6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch) | |
tree | 5a7a112fe7a8a98c6fecb45b513789d15962eb3d /tools/lib/h5diff_util.c | |
parent | 6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff) | |
download | hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2 |
[svn-r11245] Purpose:
Code cleanup
Description:
Trim trailing whitespace, which is making 'diff'ing the two branches
difficult.
Solution:
Ran this script in each directory:
foreach f (*.[ch] *.cpp)
sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
end
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
Diffstat (limited to 'tools/lib/h5diff_util.c')
-rw-r--r-- | tools/lib/h5diff_util.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 3311d7c..5370c1a 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -42,14 +42,14 @@ void parallel_print(const char* format, ...) va_start(ap, format); if(!g_Parallel) - vprintf(format, ap); + vprintf(format, ap); else { if(overflow_file == NULL) /*no overflow has occurred yet */ { bytes_written = HDvsnprintf(outBuff+outBuffOffset, OUTBUFF_SIZE-outBuffOffset, format, ap); - + va_end(ap); va_start(ap, format); @@ -57,12 +57,12 @@ void parallel_print(const char* format, ...) if(bytes_written >= (OUTBUFF_SIZE-outBuffOffset)) #else if((bytes_written+1) == (OUTBUFF_SIZE-outBuffOffset)) -#endif +#endif { /* Terminate the outbuff at the end of the previous output */ outBuff[outBuffOffset] = '\0'; - - overflow_file = HDtmpfile(); + + overflow_file = HDtmpfile(); if(overflow_file == NULL) fprintf(stderr, "Warning: Could not create overflow file. Output may be truncated.\n"); else @@ -72,7 +72,7 @@ void parallel_print(const char* format, ...) outBuffOffset += bytes_written; } else - bytes_written = HDvfprintf(overflow_file, format, ap); + bytes_written = HDvfprintf(overflow_file, format, ap); } va_end(ap); @@ -91,13 +91,13 @@ void parallel_print(const char* format, ...) * *------------------------------------------------------------------------- */ -void print_pos( int *ph, - int per, - hsize_t curr_pos, - hsize_t *acc, - hsize_t *pos, - int rank, - const char *obj1, +void print_pos( int *ph, + int per, + hsize_t curr_pos, + hsize_t *acc, + hsize_t *pos, + int rank, + const char *obj1, const char *obj2 ) { int i; @@ -108,19 +108,19 @@ void print_pos( int *ph, *ph=0; if (per) { - parallel_print("%-15s %-15s %-15s %-15s %-15s\n", - "position", - (obj1!=NULL) ? obj1 : " ", + parallel_print("%-15s %-15s %-15s %-15s %-15s\n", + "position", + (obj1!=NULL) ? obj1 : " ", (obj2!=NULL) ? obj2 : " ", - "difference", + "difference", "relative"); parallel_print("------------------------------------------------------------------------\n"); } else { - parallel_print("%-15s %-15s %-15s %-20s\n", - "position", - (obj1!=NULL) ? obj1 : " ", + parallel_print("%-15s %-15s %-15s %-20s\n", + "position", + (obj1!=NULL) ? obj1 : " ", (obj2!=NULL) ? obj2 : " ", "difference"); parallel_print("------------------------------------------------------------\n"); @@ -134,7 +134,7 @@ void print_pos( int *ph, } assert( curr_pos == 0 ); - parallel_print("[ " ); + parallel_print("[ " ); for ( i = 0; i < rank; i++) { /* HDfprintf(stdout,"%Hu ", pos[i] ); */ @@ -157,8 +157,8 @@ void print_pos( int *ph, void print_dims( int r, hsize_t *d ) { int i; - parallel_print("[ " ); - for ( i=0; i<r; i++ ) + parallel_print("[ " ); + for ( i=0; i<r; i++ ) parallel_print("%d ",(int)d[i] ); parallel_print("] " ); } @@ -166,7 +166,7 @@ void print_dims( int r, hsize_t *d ) /*------------------------------------------------------------------------- * Function: print_type * - * Purpose: Print name of datatype + * Purpose: Print name of datatype * * Return: void * @@ -180,7 +180,7 @@ void print_dims( int r, hsize_t *d ) */ void print_type(hid_t type) { - switch (H5Tget_class(type)) + switch (H5Tget_class(type)) { default: return; @@ -241,7 +241,7 @@ void print_type(hid_t type) printf("undefined integer"); } break; - + case H5T_FLOAT: if (H5Tequal(type, H5T_IEEE_F32BE)) { printf("H5T_IEEE_F32BE"); @@ -263,7 +263,7 @@ void print_type(hid_t type) printf("undefined float"); } break; - + }/*switch*/ } @@ -272,7 +272,7 @@ void print_type(hid_t type) /*------------------------------------------------------------------------- * Function: diff_basename * - * Purpose: Returns a pointer to the last component absolute name + * Purpose: Returns a pointer to the last component absolute name * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * @@ -284,7 +284,7 @@ const char* diff_basename(const char *name) { size_t i; - + if (name==NULL) return NULL; @@ -292,11 +292,11 @@ diff_basename(const char *name) i = strlen(name); while (i>0 && '/'==name[i-1]) --i; - + /* Skip backward over base name */ while (i>0 && '/'!=name[i-1]) --i; - + return(name+i); } @@ -326,7 +326,7 @@ get_type(int type) return("H5G_LINK"); default: return("user defined type"); - } + } } /*------------------------------------------------------------------------- @@ -338,7 +338,7 @@ get_type(int type) * * Date: May 9, 2003 * - * Comments: + * Comments: * *------------------------------------------------------------------------- */ @@ -353,7 +353,7 @@ get_sign(H5T_sign_t sign) return("H5T_SGN_NONE"); case H5T_SGN_2: return("H5T_SGN_2"); - } + } } @@ -371,7 +371,7 @@ get_sign(H5T_sign_t sign) const char* get_class(H5T_class_t tclass) { - switch (tclass) + switch (tclass) { default: return("Invalid class"); @@ -426,7 +426,7 @@ void print_found(hsize_t nfound) #if defined (H5DIFF_DEBUG) void print_sizes( const char *obj1, const char *obj2, hid_t f_type1, hid_t f_type2, - hid_t m_type1, hid_t m_type2 ) + hid_t m_type1, hid_t m_type2 ) { size_t f_size1, f_size2; /* size of type in file */ size_t m_size1, m_size2; /* size of type in memory */ |