summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_filters.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
commit6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch)
tree5a7a112fe7a8a98c6fecb45b513789d15962eb3d /tools/lib/h5tools_filters.c
parent6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff)
downloadhdf5-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/h5tools_filters.c')
-rw-r--r--tools/lib/h5tools_filters.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c
index 355ac14..099f132 100644
--- a/tools/lib/h5tools_filters.c
+++ b/tools/lib/h5tools_filters.c
@@ -28,8 +28,8 @@ static void print_warning(const char *dname, const char *fname)
/*-------------------------------------------------------------------------
* Function: h5tools_canreadf
*
- * Purpose: check if the dataset creation property list has filters that
- * are not registered in the current configuration
+ * Purpose: check if the dataset creation property list has filters that
+ * are not registered in the current configuration
* 1) the external filters GZIP and SZIP might not be available
* 2) the internal filters might be turned off
*
@@ -50,7 +50,7 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
int i; /* index */
int have_deflate=0; /* assume initially we do not have filters */
int have_szip=0;
- int have_shuffle=0;
+ int have_shuffle=0;
int have_fletcher=0;
int have_nbit=0;
int have_scaleoffset=0;
@@ -76,27 +76,27 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
/* get information about filters */
- if ((nfilters = H5Pget_nfilters(dcpl_id))<0)
+ if ((nfilters = H5Pget_nfilters(dcpl_id))<0)
return -1;
/* if we do not have filters, we can read the dataset safely */
if (!nfilters)
return 1;
-
+
/* check availability of filters */
- for (i=0; i<nfilters; i++)
+ for (i=0; i<nfilters; i++)
{
#ifdef H5_WANT_H5_V1_6_COMPAT
- if ((filtn = H5Pget_filter(dcpl_id,(unsigned)i,0,0,0,0,0))<0)
+ if ((filtn = H5Pget_filter(dcpl_id,(unsigned)i,0,0,0,0,0))<0)
#else
- if ((filtn = H5Pget_filter(dcpl_id,(unsigned)i,0,0,0,0,0,NULL))<0)
+ if ((filtn = H5Pget_filter(dcpl_id,(unsigned)i,0,0,0,0,0,NULL))<0)
#endif
return -1;
-
+
switch (filtn)
{
/*-------------------------------------------------------------------------
- * user defined filter
+ * user defined filter
*-------------------------------------------------------------------------
*/
default:
@@ -105,7 +105,7 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
return 0;
/*-------------------------------------------------------------------------
- * H5Z_FILTER_DEFLATE 1 , deflation like gzip
+ * H5Z_FILTER_DEFLATE 1 , deflation like gzip
*-------------------------------------------------------------------------
*/
case H5Z_FILTER_DEFLATE:
@@ -117,7 +117,7 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
}
break;
/*-------------------------------------------------------------------------
- * H5Z_FILTER_SZIP 4 , szip compression
+ * H5Z_FILTER_SZIP 4 , szip compression
*-------------------------------------------------------------------------
*/
case H5Z_FILTER_SZIP:
@@ -192,18 +192,18 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
*
* Return: 1, can write, 0, cannot, -1 error
*
- * Programmer:
+ * Programmer:
*
* Date: October 5, 2004
*
*-------------------------------------------------------------------------
*/
-int h5tools_can_encode( H5Z_filter_t filtn)
+int h5tools_can_encode( H5Z_filter_t filtn)
{
int have_deflate=0; /* assume initially we do not have filters */
int have_szip=0;
- int have_shuffle=0;
+ int have_shuffle=0;
int have_fletcher=0;
int have_nbit=0;
int have_scaleoffset=0;
@@ -247,23 +247,23 @@ int h5tools_can_encode( H5Z_filter_t filtn)
}
if(H5Zget_filter_info(filtn, &filter_config_flags)<0)
return -1;
- if ((filter_config_flags &
+ if ((filter_config_flags &
(H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) == 0) {
/* filter present but neither encode nor decode is supported (???) */
return -1;
- } else if ((filter_config_flags &
- (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
+ } else if ((filter_config_flags &
+ (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
H5Z_FILTER_CONFIG_DECODE_ENABLED) {
/* decoder only: read but not write */
return 0;
- } else if ((filter_config_flags &
- (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
+ } else if ((filter_config_flags &
+ (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
H5Z_FILTER_CONFIG_ENCODE_ENABLED) {
/* encoder only: write but not read (???) */
return -1;
- } else if ((filter_config_flags &
- (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
- (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) {
+ } else if ((filter_config_flags &
+ (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
+ (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) {
return 1;
}
break;