diff options
Diffstat (limited to 'test/filter_plugin3_dsets.c')
-rw-r--r-- | test/filter_plugin3_dsets.c | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/test/filter_plugin3_dsets.c b/test/filter_plugin3_dsets.c index b43020f..55f13ef 100644 --- a/test/filter_plugin3_dsets.c +++ b/test/filter_plugin3_dsets.c @@ -20,29 +20,37 @@ #include "H5PLextern.h" -#define FILTER3_ID 259 +#define FILTER3_ID 259 -#define PUSH_ERR(func, minor, str) H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, H5E_ERR_CLS, H5E_PLUGIN, minor, str) +#define PUSH_ERR(func, minor, str) \ + H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, H5E_ERR_CLS, H5E_PLUGIN, minor, str) -static size_t add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); +static size_t add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, + size_t nbytes, size_t *buf_size, void **buf); /* Filter class struct */ const H5Z_class2_t FILTER_INFO[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - FILTER3_ID, /* Filter ID number */ - 1, /* Encoding enabled */ - 1, /* Decoding enabled */ - "test filter plugin 3", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)add_sub_value_hdf5, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + FILTER3_ID, /* Filter ID number */ + 1, /* Encoding enabled */ + 1, /* Decoding enabled */ + "test filter plugin 3", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + (H5Z_func_t)add_sub_value_hdf5, /* The actual filter function */ }}; -H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;} -const void *H5PLget_plugin_info(void) {return FILTER_INFO;} +H5PL_type_t +H5PLget_plugin_type(void) +{ + return H5PL_TYPE_FILTER; +} +const void * +H5PLget_plugin_info(void) +{ + return FILTER_INFO; +} - /*------------------------------------------------------------------------- * Function: add_sub_value_hdf5 * @@ -61,15 +69,15 @@ const void *H5PLget_plugin_info(void) {return FILTER_INFO;} *------------------------------------------------------------------------- */ static size_t -add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, - size_t nbytes, size_t *buf_size, void **buf) +add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, + size_t *buf_size, void **buf) { - int *int_ptr = (int *)*buf; /* Pointer to the data values */ - size_t buf_left = *buf_size; /* Amount of data buffer left to process */ - int value = 0; /* Data value to add/subtract */ - unsigned majnum = 0; /* Output data from the HDF5 library call */ - unsigned minnum = 0; - unsigned relnum = 0; + int * int_ptr = (int *)*buf; /* Pointer to the data values */ + size_t buf_left = *buf_size; /* Amount of data buffer left to process */ + int value = 0; /* Data value to add/subtract */ + unsigned majnum = 0; /* Output data from the HDF5 library call */ + unsigned minnum = 0; + unsigned relnum = 0; /* Check for the library version. * We don't do anything with this information - it's just to ensure that @@ -116,4 +124,3 @@ add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_ return nbytes; } /* end add_sub_value_hdf5() */ - |