diff options
-rw-r--r-- | src/H5O.c | 2 | ||||
-rw-r--r-- | src/H5Oattr.c | 32 | ||||
-rw-r--r-- | src/H5Odtype.c | 32 | ||||
-rw-r--r-- | src/H5Ofill.c | 88 | ||||
-rw-r--r-- | src/H5Opline.c | 32 | ||||
-rw-r--r-- | src/H5Osdspace.c | 32 | ||||
-rw-r--r-- | src/H5S.c | 44 |
7 files changed, 131 insertions, 131 deletions
@@ -97,7 +97,7 @@ const H5O_msg_class_t *const H5O_msg_class_g[] = { H5O_MSG_ATTR, /*0x000C Attribute list */ H5O_MSG_NAME, /*0x000D Object name */ H5O_MSG_MTIME, /*0x000E Object modification date and time */ - H5O_MSG_SHARED, /*0x000F Shared header message */ + H5O_MSG_SHARED, /*0x000F Shared header message (shouldn't be in file) */ H5O_MSG_CONT, /*0x0010 Object header continuation */ H5O_MSG_STAB, /*0x0011 Symbol table */ H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 0503618..35a4785 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -44,6 +44,22 @@ static herr_t H5O_attr_set_crt_index(void *_mesg, H5O_crt_idx_t crt_idx); static herr_t H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int indent, int fwidth); +/* Set up & include shared message "interface" info */ +#define H5O_SHARED_TYPE H5O_MSG_ATTR +#define H5O_SHARED_DECODE H5O_attr_shared_decode +#define H5O_SHARED_DECODE_REAL H5O_attr_decode +#define H5O_SHARED_ENCODE H5O_attr_shared_encode +#define H5O_SHARED_ENCODE_REAL H5O_attr_encode +#define H5O_SHARED_SIZE H5O_attr_shared_size +#define H5O_SHARED_SIZE_REAL H5O_attr_size +#define H5O_SHARED_DELETE H5O_attr_shared_delete +#define H5O_SHARED_DELETE_REAL H5O_attr_delete +#define H5O_SHARED_LINK H5O_attr_shared_link +#define H5O_SHARED_LINK_REAL H5O_attr_link +#define H5O_SHARED_COPY_FILE H5O_attr_shared_copy_file +#define H5O_SHARED_COPY_FILE_REAL H5O_attr_copy_file +#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ + /* This message derives from H5O message class */ const H5O_msg_class_t H5O_MSG_ATTR[1] = {{ H5O_ATTR_ID, /* message id number */ @@ -95,22 +111,6 @@ H5FL_EXTERN(H5S_t); /* Declare external the free list for H5S_extent_t's */ H5FL_EXTERN(H5S_extent_t); -/* Set up & include shared message "interface" info */ -#define H5O_SHARED_TYPE H5O_MSG_ATTR -#define H5O_SHARED_DECODE H5O_attr_shared_decode -#define H5O_SHARED_DECODE_REAL H5O_attr_decode -#define H5O_SHARED_ENCODE H5O_attr_shared_encode -#define H5O_SHARED_ENCODE_REAL H5O_attr_encode -#define H5O_SHARED_SIZE H5O_attr_shared_size -#define H5O_SHARED_SIZE_REAL H5O_attr_size -#define H5O_SHARED_DELETE H5O_attr_shared_delete -#define H5O_SHARED_DELETE_REAL H5O_attr_delete -#define H5O_SHARED_LINK H5O_attr_shared_link -#define H5O_SHARED_LINK_REAL H5O_attr_link -#define H5O_SHARED_COPY_FILE H5O_attr_shared_copy_file -#define H5O_SHARED_COPY_FILE_REAL H5O_attr_copy_file -#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ - /*-------------------------------------------------------------------------- NAME diff --git a/src/H5Odtype.c b/src/H5Odtype.c index b1a0dc6..fc09760 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -45,6 +45,22 @@ static void *H5O_dtype_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_ty static herr_t H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int indent, int fwidth); +/* Set up & include shared message "interface" info */ +#define H5O_SHARED_TYPE H5O_MSG_DTYPE +#define H5O_SHARED_DECODE H5O_dtype_shared_decode +#define H5O_SHARED_DECODE_REAL H5O_dtype_decode +#define H5O_SHARED_ENCODE H5O_dtype_shared_encode +#define H5O_SHARED_ENCODE_REAL H5O_dtype_encode +#define H5O_SHARED_SIZE H5O_dtype_shared_size +#define H5O_SHARED_SIZE_REAL H5O_dtype_size +#define H5O_SHARED_DELETE H5O_dtype_shared_delete +#undef H5O_SHARED_DELETE_REAL +#define H5O_SHARED_LINK H5O_dtype_shared_link +#undef H5O_SHARED_LINK_REAL +#define H5O_SHARED_COPY_FILE H5O_dtype_shared_copy_file +#define H5O_SHARED_COPY_FILE_REAL H5O_dtype_copy_file +#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ + /* This message derives from H5O message class */ const H5O_msg_class_t H5O_MSG_DTYPE[1] = {{ H5O_DTYPE_ID, /* message id number */ @@ -95,22 +111,6 @@ const H5O_msg_class_t H5O_MSG_DTYPE[1] = {{ * and 'size' callback for places to change when updating this. */ #define H5O_DTYPE_VERSION_LATEST H5O_DTYPE_VERSION_3 -/* Set up & include shared message "interface" info */ -#define H5O_SHARED_TYPE H5O_MSG_DTYPE -#define H5O_SHARED_DECODE H5O_dtype_shared_decode -#define H5O_SHARED_DECODE_REAL H5O_dtype_decode -#define H5O_SHARED_ENCODE H5O_dtype_shared_encode -#define H5O_SHARED_ENCODE_REAL H5O_dtype_encode -#define H5O_SHARED_SIZE H5O_dtype_shared_size -#define H5O_SHARED_SIZE_REAL H5O_dtype_size -#define H5O_SHARED_DELETE H5O_dtype_shared_delete -#undef H5O_SHARED_DELETE_REAL -#define H5O_SHARED_LINK H5O_dtype_shared_link -#undef H5O_SHARED_LINK_REAL -#define H5O_SHARED_COPY_FILE H5O_dtype_shared_copy_file -#define H5O_SHARED_COPY_FILE_REAL H5O_dtype_copy_file -#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ - /*------------------------------------------------------------------------- * Function: H5O_dtype_decode_helper diff --git a/src/H5Ofill.c b/src/H5Ofill.c index a901ece..7b300bf 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -47,6 +47,50 @@ static htri_t H5O_fill_new_is_shared(const void *_mesg); static herr_t H5O_fill_new_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth); +/* Set up & include shared message "interface" info */ +#define H5O_SHARED_TYPE H5O_MSG_FILL +#define H5O_SHARED_DECODE H5O_fill_shared_decode +#define H5O_SHARED_DECODE_REAL H5O_fill_decode +#define H5O_SHARED_ENCODE H5O_fill_shared_encode +#define H5O_SHARED_ENCODE_REAL H5O_fill_encode +#define H5O_SHARED_SIZE H5O_fill_shared_size +#define H5O_SHARED_SIZE_REAL H5O_fill_size +#define H5O_SHARED_DELETE H5O_fill_shared_delete +#undef H5O_SHARED_DELETE_REAL +#define H5O_SHARED_LINK H5O_fill_shared_link +#undef H5O_SHARED_LINK_REAL +#define H5O_SHARED_COPY_FILE H5O_fill_shared_copy_file +#undef H5O_SHARED_COPY_FILE_REAL +#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ + +/* Set up & include shared message "interface" info */ +/* (Kludgy 'undef's in order to re-include the H5Oshared.h header) */ +#undef H5O_SHARED_TYPE +#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW +#undef H5O_SHARED_DECODE +#define H5O_SHARED_DECODE H5O_fill_new_shared_decode +#undef H5O_SHARED_DECODE_REAL +#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode +#undef H5O_SHARED_ENCODE +#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode +#undef H5O_SHARED_ENCODE_REAL +#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode +#undef H5O_SHARED_SIZE +#define H5O_SHARED_SIZE H5O_fill_new_shared_size +#undef H5O_SHARED_SIZE_REAL +#define H5O_SHARED_SIZE_REAL H5O_fill_new_size +#undef H5O_SHARED_DELETE +#define H5O_SHARED_DELETE H5O_fill_new_shared_delete +#undef H5O_SHARED_DELETE_REAL +#undef H5O_SHARED_LINK +#define H5O_SHARED_LINK H5O_fill_new_shared_link +#undef H5O_SHARED_LINK_REAL +#undef H5O_SHARED_COPY_FILE +#define H5O_SHARED_COPY_FILE H5O_fill_new_shared_copy_file +#undef H5O_SHARED_COPY_FILE_REAL +#undef H5Oshared_H +#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ + /* This message derives from H5O message class, for old fill value before version 1.5 */ const H5O_msg_class_t H5O_MSG_FILL[1] = {{ H5O_FILL_ID, /*message id number */ @@ -105,50 +149,6 @@ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{ /* Declare a free list to manage the H5O_fill_t struct */ H5FL_DEFINE(H5O_fill_t); -/* Set up & include shared message "interface" info */ -#define H5O_SHARED_TYPE H5O_MSG_FILL -#define H5O_SHARED_DECODE H5O_fill_shared_decode -#define H5O_SHARED_DECODE_REAL H5O_fill_decode -#define H5O_SHARED_ENCODE H5O_fill_shared_encode -#define H5O_SHARED_ENCODE_REAL H5O_fill_encode -#define H5O_SHARED_SIZE H5O_fill_shared_size -#define H5O_SHARED_SIZE_REAL H5O_fill_size -#define H5O_SHARED_DELETE H5O_fill_shared_delete -#undef H5O_SHARED_DELETE_REAL -#define H5O_SHARED_LINK H5O_fill_shared_link -#undef H5O_SHARED_LINK_REAL -#define H5O_SHARED_COPY_FILE H5O_fill_shared_copy_file -#undef H5O_SHARED_COPY_FILE_REAL -#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ - -/* Set up & include shared message "interface" info */ -/* (Kludgy 'undef's in order to re-include the H5Oshared.h header) */ -#undef H5O_SHARED_TYPE -#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW -#undef H5O_SHARED_DECODE -#define H5O_SHARED_DECODE H5O_fill_new_shared_decode -#undef H5O_SHARED_DECODE_REAL -#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode -#undef H5O_SHARED_ENCODE -#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode -#undef H5O_SHARED_ENCODE_REAL -#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode -#undef H5O_SHARED_SIZE -#define H5O_SHARED_SIZE H5O_fill_new_shared_size -#undef H5O_SHARED_SIZE_REAL -#define H5O_SHARED_SIZE_REAL H5O_fill_new_size -#undef H5O_SHARED_DELETE -#define H5O_SHARED_DELETE H5O_fill_new_shared_delete -#undef H5O_SHARED_DELETE_REAL -#undef H5O_SHARED_LINK -#define H5O_SHARED_LINK H5O_fill_new_shared_link -#undef H5O_SHARED_LINK_REAL -#undef H5O_SHARED_COPY_FILE -#define H5O_SHARED_COPY_FILE H5O_fill_new_shared_copy_file -#undef H5O_SHARED_COPY_FILE_REAL -#undef H5Oshared_H -#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ - /*------------------------------------------------------------------------- * Function: H5O_fill_new_decode diff --git a/src/H5Opline.c b/src/H5Opline.c index 2adebf5..ba9902d 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -43,6 +43,22 @@ static herr_t H5O_pline_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t *ty static herr_t H5O_pline_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int indent, int fwidth); +/* Set up & include shared message "interface" info */ +#define H5O_SHARED_TYPE H5O_MSG_PLINE +#define H5O_SHARED_DECODE H5O_pline_shared_decode +#define H5O_SHARED_DECODE_REAL H5O_pline_decode +#define H5O_SHARED_ENCODE H5O_pline_shared_encode +#define H5O_SHARED_ENCODE_REAL H5O_pline_encode +#define H5O_SHARED_SIZE H5O_pline_shared_size +#define H5O_SHARED_SIZE_REAL H5O_pline_size +#define H5O_SHARED_DELETE H5O_pline_shared_delete +#undef H5O_SHARED_DELETE_REAL +#define H5O_SHARED_LINK H5O_pline_shared_link +#undef H5O_SHARED_LINK_REAL +#define H5O_SHARED_COPY_FILE H5O_pline_shared_copy_file +#undef H5O_SHARED_COPY_FILE_REAL +#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ + /* This message derives from H5O message class */ const H5O_msg_class_t H5O_MSG_PLINE[1] = {{ H5O_PLINE_ID, /* message id number */ @@ -85,22 +101,6 @@ const H5O_msg_class_t H5O_MSG_PLINE[1] = {{ /* Declare a free list to manage the H5O_pline_t struct */ H5FL_DEFINE(H5O_pline_t); -/* Set up & include shared message "interface" info */ -#define H5O_SHARED_TYPE H5O_MSG_PLINE -#define H5O_SHARED_DECODE H5O_pline_shared_decode -#define H5O_SHARED_DECODE_REAL H5O_pline_decode -#define H5O_SHARED_ENCODE H5O_pline_shared_encode -#define H5O_SHARED_ENCODE_REAL H5O_pline_encode -#define H5O_SHARED_SIZE H5O_pline_shared_size -#define H5O_SHARED_SIZE_REAL H5O_pline_size -#define H5O_SHARED_DELETE H5O_pline_shared_delete -#undef H5O_SHARED_DELETE_REAL -#define H5O_SHARED_LINK H5O_pline_shared_link -#undef H5O_SHARED_LINK_REAL -#define H5O_SHARED_COPY_FILE H5O_pline_shared_copy_file -#undef H5O_SHARED_COPY_FILE_REAL -#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ - /*------------------------------------------------------------------------- * Function: H5O_pline_decode diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index c6dad3f..93a0bf0 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -39,6 +39,22 @@ static herr_t H5O_sdspace_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t * static herr_t H5O_sdspace_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int indent, int fwidth); +/* Set up & include shared message "interface" info */ +#define H5O_SHARED_TYPE H5O_MSG_SDSPACE +#define H5O_SHARED_DECODE H5O_sdspace_shared_decode +#define H5O_SHARED_DECODE_REAL H5O_sdspace_decode +#define H5O_SHARED_ENCODE H5O_sdspace_shared_encode +#define H5O_SHARED_ENCODE_REAL H5O_sdspace_encode +#define H5O_SHARED_SIZE H5O_sdspace_shared_size +#define H5O_SHARED_SIZE_REAL H5O_sdspace_size +#define H5O_SHARED_DELETE H5O_sdspace_shared_delete +#undef H5O_SHARED_DELETE_REAL +#define H5O_SHARED_LINK H5O_sdspace_shared_link +#undef H5O_SHARED_LINK_REAL +#define H5O_SHARED_COPY_FILE H5O_sdspace_shared_copy_file +#undef H5O_SHARED_COPY_FILE_REAL +#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ + /* This message derives from H5O message class */ const H5O_msg_class_t H5O_MSG_SDSPACE[1] = {{ H5O_SDSPACE_ID, /* message id number */ @@ -83,22 +99,6 @@ H5FL_EXTERN(H5S_extent_t); /* Declare external the free list for hsize_t arrays */ H5FL_ARR_EXTERN(hsize_t); -/* Set up & include shared message "interface" info */ -#define H5O_SHARED_TYPE H5O_MSG_SDSPACE -#define H5O_SHARED_DECODE H5O_sdspace_shared_decode -#define H5O_SHARED_DECODE_REAL H5O_sdspace_decode -#define H5O_SHARED_ENCODE H5O_sdspace_shared_encode -#define H5O_SHARED_ENCODE_REAL H5O_sdspace_encode -#define H5O_SHARED_SIZE H5O_sdspace_shared_size -#define H5O_SHARED_SIZE_REAL H5O_sdspace_size -#define H5O_SHARED_DELETE H5O_sdspace_shared_delete -#undef H5O_SHARED_DELETE_REAL -#define H5O_SHARED_LINK H5O_sdspace_shared_link -#undef H5O_SHARED_LINK_REAL -#define H5O_SHARED_COPY_FILE H5O_sdspace_shared_copy_file -#undef H5O_SHARED_COPY_FILE_REAL -#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ - /*-------------------------------------------------------------------------- NAME @@ -602,20 +602,20 @@ herr_t H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src) { unsigned u; - herr_t ret_value=SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5S_extent_copy, FAIL); + FUNC_ENTER_NOAPI(H5S_extent_copy, FAIL) /* Copy the regular fields */ - dst->type=src->type; - dst->nelem=src->nelem; - dst->rank=src->rank; + dst->type = src->type; + dst->nelem = src->nelem; + dst->rank = src->rank; switch (src->type) { case H5S_NULL: case H5S_SCALAR: - dst->size=NULL; - dst->max=NULL; + dst->size = NULL; + dst->max = NULL; break; case H5S_SIMPLE: @@ -636,17 +636,17 @@ H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src) break; default: - assert("unknown data space type" && 0); + HDassert("unknown data space type" && 0); break; - } + } /* end switch */ /* Copy the shared object info */ if(NULL == H5O_msg_copy(H5O_SHARED_ID, &(src->sh_loc), &(dst->sh_loc))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy shared information"); + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy shared information") done: - FUNC_LEAVE_NOAPI(ret_value); -} + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S_extent_copy() */ /*------------------------------------------------------------------------- @@ -676,25 +676,25 @@ H5S_copy(const H5S_t *src, hbool_t share_selection) H5S_t *dst = NULL; H5S_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI(H5S_copy, NULL); + FUNC_ENTER_NOAPI(H5S_copy, NULL) - if (NULL==(dst = H5FL_MALLOC(H5S_t))) - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + if(NULL == (dst = H5FL_MALLOC(H5S_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Copy the source dataspace's extent */ - if (H5S_extent_copy(&(dst->extent),&(src->extent))<0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent"); + if(H5S_extent_copy(&(dst->extent), &(src->extent)) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent") /* Copy the source dataspace's selection */ - if (H5S_select_copy(dst,src,share_selection)<0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy select"); + if(H5S_select_copy(dst, src, share_selection) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy select") /* Set the return value */ - ret_value=dst; + ret_value = dst; done: - FUNC_LEAVE_NOAPI(ret_value); -} + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S_copy() */ /*------------------------------------------------------------------------- |