summaryrefslogtreecommitdiffstats
path: root/c++/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-04-09 14:27:01 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-04-09 14:27:01 (GMT)
commit33bad44a26efc211dca062df2a85a4dc95045ec4 (patch)
tree914943046c093b0b5794eebe3a04ca0ade33c42c /c++/test
parentdbd6046ec6437fe23d1808fad8c51e75017bfadf (diff)
downloadhdf5-33bad44a26efc211dca062df2a85a4dc95045ec4.zip
hdf5-33bad44a26efc211dca062df2a85a4dc95045ec4.tar.gz
hdf5-33bad44a26efc211dca062df2a85a4dc95045ec4.tar.bz2
[svn-r6616] Purpose:
Code cleanup Description: Chase H5Zfilter API changes. Solution: Platforms tested: FreeBSD 4.8 (sleipnir) w/C++ Misc. update:
Diffstat (limited to 'c++/test')
-rw-r--r--c++/test/dsets.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 4fea36c..8a2d77e 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -52,7 +52,11 @@ const char *FILENAME[] = {
#define DSET_COMPRESS_NAME "compressed"
#define DSET_BOGUS_NAME "bogus"
-#define H5Z_BOGUS 305
+#define H5Z_FILTER_BOGUS 305
+
+/* Local prototypes for filter functions */
+static size_t bogus(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
/*-------------------------------------------------------------------------
@@ -368,6 +372,15 @@ test_tconv( H5File& file)
return -1;
}
+/* This message derives from H5Z */
+const H5Z_class_t H5Z_BOGUS[1] = {{
+ H5Z_FILTER_BOGUS, /* Filter id number */
+ "bogus", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ bogus, /* The actual filter function */
+}};
+
/*-------------------------------------------------------------------------
* Function: bogus
*
@@ -637,9 +650,9 @@ test_compression(H5File& file)
TESTING("compression (app-defined method)");
// BMR: not sure how to handle this yet
- if (H5Zregister (H5Z_BOGUS, DSET_BOGUS_NAME, bogus)<0) goto error;
- if (H5Pset_filter (dscreatplist.getId(), H5Z_BOGUS, 0, 0, NULL)<0) goto error;
- dscreatplist.setFilter (H5Z_BOGUS, 0, 0, NULL);
+ if (H5Zregister (H5Z_BOGUS)<0) goto error;
+ if (H5Pset_filter (dscreatplist.getId(), H5Z_FILTER_BOGUS, 0, 0, NULL)<0) goto error;
+ dscreatplist.setFilter (H5Z_FILTER_BOGUS, 0, 0, NULL);
DataSpace space2 (2, size, NULL);
dataset = new DataSet (file.createDataSet (DSET_BOGUS_NAME, PredType::NATIVE_INT, space2, dscreatplist));