summaryrefslogtreecommitdiffstats
path: root/src/H5Pdcpl.c
diff options
context:
space:
mode:
authorNat Furrer <nfurrer@ncsa.uiuc.edu>2004-06-28 19:46:03 (GMT)
committerNat Furrer <nfurrer@ncsa.uiuc.edu>2004-06-28 19:46:03 (GMT)
commit6d682a5a28f1ad599db5ad77e135b25a2efe7ae7 (patch)
tree678b86bf8d678460c0db11fa9cb9e09f40206775 /src/H5Pdcpl.c
parent903580837a2e43d2b72c39206746a20d840c54e8 (diff)
downloadhdf5-6d682a5a28f1ad599db5ad77e135b25a2efe7ae7.zip
hdf5-6d682a5a28f1ad599db5ad77e135b25a2efe7ae7.tar.gz
hdf5-6d682a5a28f1ad599db5ad77e135b25a2efe7ae7.tar.bz2
[svn-r8753]
Purpose: Handled SZIP without the encoder present. Description: It is now an error for a user to try to create, extend, or write to a dataset without the encoder present in their SZIP library. Added H5Zget_filter_info to provide users with a way to query HDF5 about the presence (or lack thereof) of the SZIP encoder. Platforms tested: Windows Verbena Arabica Copper Misc. update:
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r--src/H5Pdcpl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 6466c3e..95bc649 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -1003,6 +1003,10 @@ done:
*
* Modifications:
*
+ * Nat Furrer and James Laird
+ * June 17, 2004
+ * Now ensures that SZIP encoding is enabled
+ *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1017,6 +1021,9 @@ H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block)
H5TRACE3("e","iIuIu",plist_id,options_mask,pixels_per_block);
/* Check arguments */
+#if !defined( H5_SZIP_CAN_ENCODE) && defined(H5_HAVE_FILTER_SZIP)
+ HGOTO_ERROR (H5E_PLINE, H5E_NOENCODER, FAIL, "Szip filter present but encoding disabled");
+#endif
if ((pixels_per_block%2)==1)
HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "pixels_per_block is not even");
if (pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK)
@@ -1642,3 +1649,4 @@ H5Premove_filter(hid_t plist_id, H5Z_filter_t filter)
done:
FUNC_LEAVE_API(ret_value);
}
+