summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Odtype.c28
-rw-r--r--src/H5Zpublic.h22
2 files changed, 27 insertions, 23 deletions
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index ef75b54..73829c2 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -17,8 +17,8 @@
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
#include "H5Fprivate.h" /* Files */
+#include "H5FLprivate.h" /* Free Lists */
#include "H5Gprivate.h" /* Groups */
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
@@ -161,7 +161,7 @@ H5O_dtype_decode_helper(H5F_t *f, const uint8_t **pp, H5T_t *dt)
* Opaque types...
*/
z = flags & (H5T_OPAQUE_TAG_MAX - 1);
- HDassert(0==(z&0x7)); /*must be aligned*/
+ HDassert(0 == (z & 0x7)); /*must be aligned*/
if(NULL == (dt->shared->u.opaque.tag = H5MM_malloc(z + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
HDmemcpy(dt->shared->u.opaque.tag, *pp, z);
@@ -949,7 +949,7 @@ H5O_dtype_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p)
/* Perform actual decode of message */
if(H5O_dtype_decode_helper(f, &p, dt) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode type");
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode type")
/* Set return value */
ret_value = dt;
@@ -1030,28 +1030,28 @@ H5O_dtype_copy(const void *_src, void *_dst, unsigned UNUSED update_flags)
H5T_t *dst = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_copy);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_copy)
/* check args */
- assert(src);
+ HDassert(src);
- /* copy */
- if (NULL == (dst = H5T_copy(src, H5T_COPY_ALL)))
+ /* Copy */
+ if(NULL == (dst = H5T_copy(src, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't copy type")
- /* was result already allocated? */
- if (_dst) {
+ /* Was result already allocated? */
+ if(_dst) {
*((H5T_t *) _dst) = *dst;
- H5FL_FREE(H5T_t,dst);
+ H5FL_FREE(H5T_t, dst);
dst = (H5T_t *) _dst;
- }
+ } /* end if */
/* Set return value */
- ret_value=dst;
+ ret_value = dst;
done:
- FUNC_LEAVE_NOAPI(ret_value);
-}
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5O_dtype_copy() */
/*--------------------------------------------------------------------------
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index a559174..c632c65 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -27,25 +27,29 @@
* appear in the HDF5 files.
*/
typedef int H5Z_filter_t;
+
+/* Filter IDs */
#define H5Z_FILTER_ERROR (-1) /*no filter */
#define H5Z_FILTER_NONE 0 /*reserved indefinitely */
-#define H5Z_FILTER_ALL 0 /*symbol to remove all filters in H5Premove_filter */
#define H5Z_FILTER_DEFLATE 1 /*deflation like gzip */
#define H5Z_FILTER_SHUFFLE 2 /*shuffle the data */
-#define H5Z_FILTER_FLETCHER32 3 /*fletcher32 checksum of EDC */
-#define H5Z_FILTER_SZIP 4 /*szip compression */
-#define H5Z_FILTER_NBIT 5 /*nbit compression */
-#define H5Z_FILTER_SCALEOFFSET 6 /*scaleoffset compression */
-#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved */
+#define H5Z_FILTER_FLETCHER32 3 /*fletcher32 checksum of EDC */
+#define H5Z_FILTER_SZIP 4 /*szip compression */
+#define H5Z_FILTER_NBIT 5 /*nbit compression */
+#define H5Z_FILTER_SCALEOFFSET 6 /*scale+offset compression */
+#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved for library use */
#define H5Z_FILTER_MAX 65535 /*maximum filter id */
+
+/* General macros */
+#define H5Z_FILTER_ALL 0 /* Symbol to remove all filters in H5Premove_filter */
#define H5Z_MAX_NFILTERS 32 /* Maximum number of filters allowed in a pipeline (should probably be allowed to be an unlimited amount) */
-/* Flags for filter definition */
+/* Flags for filter definition (stored) */
#define H5Z_FLAG_DEFMASK 0x00ff /*definition flag mask */
#define H5Z_FLAG_MANDATORY 0x0000 /*filter is mandatory */
#define H5Z_FLAG_OPTIONAL 0x0001 /*filter is optional */
-/* Additional flags for filter invocation */
+/* Additional flags for filter invocation (not stored) */
#define H5Z_FLAG_INVMASK 0xff00 /*invocation flag mask */
#define H5Z_FLAG_REVERSE 0x0100 /*reverse direction; read */
#define H5Z_FLAG_SKIP_EDC 0x0200 /*skip EDC filters for read */
@@ -174,7 +178,7 @@ typedef size_t (*H5Z_func_t)(unsigned int flags, size_t cd_nelmts,
* contain a pointers to the filter function and timing statistics.
*/
typedef struct H5Z_class_t {
- int version; /* Version number of the H5Z_class_t struct */
+ int version; /* Version number of the H5Z_class_t struct */
H5Z_filter_t id; /* Filter ID number */
unsigned encoder_present; /* Does this filter have an encoder? */
unsigned decoder_present; /* Does this filter have a decoder? */