diff options
author | Robert E. McGrath <mcgrath@ncsa.uiuc.edu> | 2004-11-02 19:14:14 (GMT) |
---|---|---|
committer | Robert E. McGrath <mcgrath@ncsa.uiuc.edu> | 2004-11-02 19:14:14 (GMT) |
commit | 25c1e28ffd660e713f97b65e70620c7128f46f1f (patch) | |
tree | ad6abf34988df6351d4b579a7b87be6f822ca247 /tools/h5repack/testh5repack_detect_szip.c | |
parent | 8c0c4f945db726fcddd2a40e4f617cdf6aac6be8 (diff) | |
download | hdf5-25c1e28ffd660e713f97b65e70620c7128f46f1f.zip hdf5-25c1e28ffd660e713f97b65e70620c7128f46f1f.tar.gz hdf5-25c1e28ffd660e713f97b65e70620c7128f46f1f.tar.bz2 |
[svn-r9496] Purpose:
Fix SZIP filter to dynmically detect encoder.
Description:
Solution:
See:
http://hdf.ncsa.uiuc.edu/RFC/SZIP/Szip_dynamic_12_Oct.pdf
Changes to h5repack tests, contingent on detecting SZIP encoder.
Note new program:
testh5repack_detect_szip
Checks fo rencoder, prints out "yes" or "no". Used by hrepack.sh
to detect encoder. Can also be used for windows tests. This is
only used as part of the tests.
Had to modify Makefile to build and clean this program.
Diffstat (limited to 'tools/h5repack/testh5repack_detect_szip.c')
-rw-r--r-- | tools/h5repack/testh5repack_detect_szip.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tools/h5repack/testh5repack_detect_szip.c b/tools/h5repack/testh5repack_detect_szip.c new file mode 100644 index 0000000..9e6514f --- /dev/null +++ b/tools/h5repack/testh5repack_detect_szip.c @@ -0,0 +1,51 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include <stdio.h> +#include "hdf5.h" +#include "h5test.h" +#include "h5repack.h" + + +/*------------------------------------------------------------------------- + * Function: main + * + * Purpose: detects szip encoder, prints "yes" or "no" to stdout. + * Intended to be used in test scripts. + * + * Return: + * + * Programmer: + * + * Date: + * + * Comments: + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + + +void main(void) +{ +#ifdef H5_HAVE_FILTER_SZIP + if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { + printf("yes\n"); + exit(1); + } +#endif /* H5_HAVE_FILTER_SZIP */ + printf("no\n"); + exit(0); +} |