From 6ae314a698dcb1b0f1c1d9f83cf59ec8f7cd966e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Oct 2019 12:42:31 -0500 Subject: Whitespace and macro semi-colon --- src/H5Ofsinfo.c | 2 +- src/H5Omtime.c | 264 +++++++++++++++++++++++----------------------- src/H5Oname.c | 68 ++++++------ src/H5Opline.c | 2 +- src/H5Opublic.h | 55 +++++----- src/H5Pdcpl.c | 2 +- src/H5Plcpl.c | 3 +- tools/lib/h5tools.c | 32 +++--- tools/lib/h5tools_dump.c | 92 ++++++++-------- tools/src/h5dump/h5dump.c | 3 +- 10 files changed, 260 insertions(+), 263 deletions(-) diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index 1a4ca47..37165eb 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -109,7 +109,7 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, /* Allocate space for message */ if(NULL == (fsinfo = H5FL_CALLOC(H5O_fsinfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") for(ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; H5_INC_ENUM(H5F_mem_page_t, ptype)) fsinfo->fs_addr[ptype - 1] = HADDR_UNDEF; diff --git a/src/H5Omtime.c b/src/H5Omtime.c index fbf7613..0ecc0d7 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -11,20 +11,20 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Robb Matzke - * Friday, July 24, 1998 +/* Programmer: Robb Matzke + * Friday, July 24, 1998 * - * Purpose: The object modification time message. + * Purpose: The object modification time message. */ #include "H5Omodule.h" /* This source code file is part of the H5O module */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free lists */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Opkg.h" /* Object headers */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free lists */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Opkg.h" /* Object headers */ static void *H5O__mtime_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, @@ -43,62 +43,62 @@ static herr_t H5O__mtime_debug(H5F_t *f, const void *_mesg, FILE *stream, /* This message derives from H5O message class */ const H5O_msg_class_t H5O_MSG_MTIME[1] = {{ - H5O_MTIME_ID, /*message id number */ - "mtime", /*message name for debugging */ - sizeof(time_t), /*native message size */ - 0, /* messages are sharable? */ - H5O__mtime_decode, /*decode message */ - H5O_mtime_encode, /*encode message */ - H5O_mtime_copy, /*copy the native value */ - H5O_mtime_size, /*raw message size */ - NULL, /* reset method */ - H5O__mtime_free, /* free method */ - NULL, /* file delete method */ - NULL, /* link method */ - NULL, /*set share method */ - NULL, /*can share method */ - NULL, /* pre copy native value to file */ - NULL, /* copy native value to file */ - NULL, /* post copy native value to file */ - NULL, /* get creation index */ - NULL, /* set creation index */ - H5O__mtime_debug /*debug the message */ + H5O_MTIME_ID, /*message id number */ + "mtime", /*message name for debugging */ + sizeof(time_t), /*native message size */ + 0, /* messages are sharable? */ + H5O__mtime_decode, /*decode message */ + H5O_mtime_encode, /*encode message */ + H5O_mtime_copy, /*copy the native value */ + H5O_mtime_size, /*raw message size */ + NULL, /* reset method */ + H5O__mtime_free, /* free method */ + NULL, /* file delete method */ + NULL, /* link method */ + NULL, /*set share method */ + NULL, /*can share method */ + NULL, /* pre copy native value to file */ + NULL, /* copy native value to file */ + NULL, /* post copy native value to file */ + NULL, /* get creation index */ + NULL, /* set creation index */ + H5O__mtime_debug /*debug the message */ }}; /* This message derives from H5O message class */ /* (Only encode, decode & size routines are different from old mtime routines) */ const H5O_msg_class_t H5O_MSG_MTIME_NEW[1] = {{ - H5O_MTIME_NEW_ID, /*message id number */ - "mtime_new", /*message name for debugging */ - sizeof(time_t), /*native message size */ - 0, /* messages are sharable? */ - H5O__mtime_new_decode, /*decode message */ - H5O_mtime_new_encode, /*encode message */ - H5O_mtime_copy, /*copy the native value */ - H5O_mtime_new_size, /*raw message size */ - NULL, /* reset method */ - H5O__mtime_free, /* free method */ - NULL, /* file delete method */ - NULL, /* link method */ - NULL, /*set share method */ - NULL, /*can share method */ - NULL, /* pre copy native value to file */ - NULL, /* copy native value to file */ - NULL, /* post copy native value to file */ - NULL, /* get creation index */ - NULL, /* set creation index */ - H5O__mtime_debug /*debug the message */ + H5O_MTIME_NEW_ID, /*message id number */ + "mtime_new", /*message name for debugging */ + sizeof(time_t), /*native message size */ + 0, /* messages are sharable? */ + H5O__mtime_new_decode, /*decode message */ + H5O_mtime_new_encode, /*encode message */ + H5O_mtime_copy, /*copy the native value */ + H5O_mtime_new_size, /*raw message size */ + NULL, /* reset method */ + H5O__mtime_free, /* free method */ + NULL, /* file delete method */ + NULL, /* link method */ + NULL, /*set share method */ + NULL, /*can share method */ + NULL, /* pre copy native value to file */ + NULL, /* copy native value to file */ + NULL, /* post copy native value to file */ + NULL, /* get creation index */ + NULL, /* set creation index */ + H5O__mtime_debug /*debug the message */ }}; /* Current version of new mtime information */ -#define H5O_MTIME_VERSION 1 +#define H5O_MTIME_VERSION 1 /* Declare a free list to manage the time_t struct */ H5FL_DEFINE(time_t); - + /*------------------------------------------------------------------------- - * Function: H5O__mtime_new_decode + * Function: H5O__mtime_new_decode * * Purpose: Decode a new modification time message and return a pointer to * a new time_t value. @@ -106,13 +106,13 @@ H5FL_DEFINE(time_t); * The new modification time message format was added due to the * performance overhead of the old format. * - * Return: Success: Ptr to new message in native struct. + * Return: Success: Ptr to new message in native struct. * - * Failure: NULL + * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 3 2002 + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Jan 3 2002 * *------------------------------------------------------------------------- */ @@ -121,7 +121,7 @@ H5O__mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { - time_t *mesg; + time_t *mesg; uint32_t tmp_time; /* Temporary copy of the time */ void *ret_value = NULL; /* Return value */ @@ -153,9 +153,9 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__mtime_new_decode() */ - + /*------------------------------------------------------------------------- - * Function: H5O__mtime_decode + * Function: H5O__mtime_decode * * Purpose: Decode a modification time message and return a pointer to a * new time_t value. @@ -163,13 +163,13 @@ done: * The new modification time message format was added due to the * performance overhead of the old format. * - * Return: Success: Ptr to new message in native struct. + * Return: Success: Ptr to new message in native struct. * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 24 1998 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 24 1998 * *------------------------------------------------------------------------- */ @@ -178,9 +178,9 @@ H5O__mtime_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { - time_t *mesg, the_time; - struct tm tm; - int i; /* Local index variable */ + time_t *mesg, the_time; + struct tm tm; + int i; /* Local index variable */ void *ret_value = NULL; /* Return value */ FUNC_ENTER_STATIC @@ -218,24 +218,24 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__mtime_decode() */ - + /*------------------------------------------------------------------------- - * Function: H5O_mtime_new_encode + * Function: H5O_mtime_new_encode * - * Purpose: Encodes a new modification time message. + * Purpose: Encodes a new modification time message. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 3 2002 + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Jan 3 2002 * *------------------------------------------------------------------------- */ static herr_t H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg) { - const time_t *mesg = (const time_t *) _mesg; + const time_t *mesg = (const time_t *) _mesg; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -258,17 +258,17 @@ H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_mtime_new_encode() */ - + /*------------------------------------------------------------------------- - * Function: H5O_mtime_encode + * Function: H5O_mtime_encode * - * Purpose: Encodes a modification time message. + * Purpose: Encodes a modification time message. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 24 1998 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 24 1998 * * Modifications: * @@ -277,8 +277,8 @@ H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha static herr_t H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg) { - const time_t *mesg = (const time_t *) _mesg; - struct tm *tm; + const time_t *mesg = (const time_t *) _mesg; + struct tm *tm; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -296,20 +296,20 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, FUNC_LEAVE_NOAPI(SUCCEED) } - + /*------------------------------------------------------------------------- - * Function: H5O_mtime_copy + * Function: H5O_mtime_copy * - * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if - * necessary. + * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if + * necessary. * - * Return: Success: Ptr to _DEST + * Return: Success: Ptr to _DEST * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 24 1998 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 24 1998 * * Modifications: * @@ -318,8 +318,8 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, static void * H5O_mtime_copy(const void *_mesg, void *_dest) { - const time_t *mesg = (const time_t *) _mesg; - time_t *dest = (time_t *) _dest; + const time_t *mesg = (const time_t *) _mesg; + time_t *dest = (time_t *) _dest; void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -339,22 +339,22 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5O_mtime_new_size + * Function: H5O_mtime_new_size * - * Purpose: Returns the size of the raw message in bytes not - * counting the message type or size fields, but only the data - * fields. This function doesn't take into account - * alignment. + * Purpose: Returns the size of the raw message in bytes not + * counting the message type or size fields, but only the data + * fields. This function doesn't take into account + * alignment. * - * Return: Success: Message data size in bytes w/o alignment. + * Return: Success: Message data size in bytes w/o alignment. * - * Failure: 0 + * Failure: 0 * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 3 2002 + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Jan 3 2002 * * Modifications: * @@ -372,22 +372,22 @@ H5O_mtime_new_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disabl FUNC_LEAVE_NOAPI(8) } /* end H5O_mtime_new_size() */ - + /*------------------------------------------------------------------------- - * Function: H5O_mtime_size + * Function: H5O_mtime_size * - * Purpose: Returns the size of the raw message in bytes not - * counting the message type or size fields, but only the data - * fields. This function doesn't take into account - * alignment. + * Purpose: Returns the size of the raw message in bytes not + * counting the message type or size fields, but only the data + * fields. This function doesn't take into account + * alignment. * - * Return: Success: Message data size in bytes w/o alignment. + * Return: Success: Message data size in bytes w/o alignment. * - * Failure: 0 + * Failure: 0 * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 14 1998 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 14 1998 * * Modifications: * @@ -405,15 +405,15 @@ H5O_mtime_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_sh FUNC_LEAVE_NOAPI(16) } - + /*------------------------------------------------------------------------- - * Function: H5O__mtime_free + * Function: H5O__mtime_free * - * Purpose: Frees the message + * Purpose: Frees the message * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, March 30, 2000 * *------------------------------------------------------------------------- @@ -430,17 +430,17 @@ H5O__mtime_free(void *mesg) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__mtime_free() */ - + /*------------------------------------------------------------------------- - * Function: H5O__mtime_debug + * Function: H5O__mtime_debug * - * Purpose: Prints debugging info for the message. + * Purpose: Prints debugging info for the message. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 24 1998 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 24 1998 * *------------------------------------------------------------------------- */ @@ -448,9 +448,9 @@ static herr_t H5O__mtime_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int indent, int fwidth) { - const time_t *mesg = (const time_t *)_mesg; - struct tm *tm; - char buf[128]; + const time_t *mesg = (const time_t *)_mesg; + struct tm *tm; + char buf[128]; FUNC_ENTER_STATIC_NOERR diff --git a/src/H5Oname.c b/src/H5Oname.c index 1f20f10..dbfa710 100644 --- a/src/H5Oname.c +++ b/src/H5Oname.c @@ -25,10 +25,10 @@ #include "H5Omodule.h" /* This source code file is part of the H5O module */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Opkg.h" /* Object headers */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Opkg.h" /* Object headers */ /* PRIVATE PROTOTYPES */ @@ -43,29 +43,29 @@ static herr_t H5O__name_debug(H5F_t *f, const void *_mesg, FILE * stream, /* This message derives from H5O message class */ const H5O_msg_class_t H5O_MSG_NAME[1] = {{ - H5O_NAME_ID, /*message id number */ - "name", /*message name for debugging */ - sizeof(H5O_name_t), /*native message size */ - 0, /* messages are sharable? */ - H5O__name_decode, /*decode message */ - H5O_name_encode, /*encode message */ - H5O_name_copy, /*copy the native value */ - H5O_name_size, /*raw message size */ - H5O__name_reset, /*free internal memory */ - NULL, /* free method */ - NULL, /* file delete method */ - NULL, /* link method */ - NULL, /*set share method */ - NULL, /*can share method */ - NULL, /* pre copy native value to file */ - NULL, /* copy native value to file */ - NULL, /* post copy native value to file */ - NULL, /* get creation index */ - NULL, /* set creation index */ - H5O__name_debug /*debug the message */ + H5O_NAME_ID, /*message id number */ + "name", /*message name for debugging */ + sizeof(H5O_name_t), /*native message size */ + 0, /* messages are sharable? */ + H5O__name_decode, /*decode message */ + H5O_name_encode, /*encode message */ + H5O_name_copy, /*copy the native value */ + H5O_name_size, /*raw message size */ + H5O__name_reset, /*free internal memory */ + NULL, /* free method */ + NULL, /* file delete method */ + NULL, /* link method */ + NULL, /*set share method */ + NULL, /*can share method */ + NULL, /* pre copy native value to file */ + NULL, /* copy native value to file */ + NULL, /* post copy native value to file */ + NULL, /* get creation index */ + NULL, /* set creation index */ + H5O__name_debug /*debug the message */ }}; - + /*------------------------------------------------------------------------- * Function: H5O__name_decode * @@ -98,9 +98,9 @@ H5O__name_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, /* decode */ if(NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") if(NULL == (mesg->s = (char *)H5MM_strdup((const char *)p))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Set return value */ ret_value = mesg; @@ -113,7 +113,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__name_decode() */ - + /*------------------------------------------------------------------------- * Function: H5O_name_encode * @@ -147,7 +147,7 @@ H5O_name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, FUNC_LEAVE_NOAPI(SUCCEED) } - + /*------------------------------------------------------------------------- * Function: H5O_name_copy * @@ -179,7 +179,7 @@ H5O_name_copy(const void *_mesg, void *_dest) HDassert(mesg); if(!dest && NULL == (dest = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* copy */ *dest = *mesg; @@ -197,7 +197,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_name_copy() */ - + /*------------------------------------------------------------------------- * Function: H5O_name_size * @@ -235,7 +235,7 @@ H5O_name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5O__name_reset * @@ -266,7 +266,7 @@ H5O__name_reset(void *_mesg) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__name_reset() */ - + /*------------------------------------------------------------------------- * Function: H5O__name_debug * @@ -286,7 +286,7 @@ static herr_t H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int indent, int fwidth) { - const H5O_name_t *mesg = (const H5O_name_t *)_mesg; + const H5O_name_t *mesg = (const H5O_name_t *)_mesg; FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Opline.c b/src/H5Opline.c index 57fa8dc..40df939 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -13,7 +13,7 @@ /* * Programmer: Robb Matzke - * Wednesday, April 15, 1998 + * Wednesday, April 15, 1998 * * Purpose: Data filter pipeline message. */ diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 234f4f0..f193cef 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -38,7 +38,7 @@ #define H5O_COPY_SHALLOW_HIERARCHY_FLAG (0x0001u) /* Copy only immediate members */ #define H5O_COPY_EXPAND_SOFT_LINK_FLAG (0x0002u) /* Expand soft links into new objects */ #define H5O_COPY_EXPAND_EXT_LINK_FLAG (0x0004u) /* Expand external links into new objects */ -#define H5O_COPY_EXPAND_REFERENCE_FLAG (0x0008u) /* Copy objects that are pointed by references */ +#define H5O_COPY_EXPAND_REFERENCE_FLAG (0x0008u) /* Copy objects that are pointed by references */ #define H5O_COPY_WITHOUT_ATTR_FLAG (0x0010u) /* Copy object without copying attributes */ #define H5O_COPY_PRESERVE_NULL_FLAG (0x0020u) /* Copy NULL messages (empty space) */ #define H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG (0x0040u) /* Merge committed datatypes in dest file */ @@ -75,7 +75,7 @@ /* Flags for H5Oget_info. * Theses flags determine which fields will be filled in in the H5O_info_t - * struct. + * struct. */ #define H5O_INFO_BASIC 0x0001u /* Fill in the fileno, addr, type, and rc fields */ #define H5O_INFO_TIME 0x0002u /* Fill in the atime, mtime, ctime, and btime fields */ @@ -90,43 +90,43 @@ /* Types of objects in file */ typedef enum H5O_type_t { - H5O_TYPE_UNKNOWN = -1, /* Unknown object type */ - H5O_TYPE_GROUP, /* Object is a group */ - H5O_TYPE_DATASET, /* Object is a dataset */ - H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */ + H5O_TYPE_UNKNOWN = -1, /* Unknown object type */ + H5O_TYPE_GROUP, /* Object is a group */ + H5O_TYPE_DATASET, /* Object is a dataset */ + H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */ H5O_TYPE_MAP, /* Object is a map */ H5O_TYPE_NTYPES /* Number of different object types (must be last!) */ } H5O_type_t; /* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */ typedef struct H5O_hdr_info_t { - unsigned version; /* Version number of header format in file */ - unsigned nmesgs; /* Number of object header messages */ - unsigned nchunks; /* Number of object header chunks */ + unsigned version; /* Version number of header format in file */ + unsigned nmesgs; /* Number of object header messages */ + unsigned nchunks; /* Number of object header chunks */ unsigned flags; /* Object header status flags */ struct { - hsize_t total; /* Total space for storing object header in file */ - hsize_t meta; /* Space within header for object header metadata information */ - hsize_t mesg; /* Space within header for actual message information */ - hsize_t free; /* Free space within object header */ + hsize_t total; /* Total space for storing object header in file */ + hsize_t meta; /* Space within header for object header metadata information */ + hsize_t mesg; /* Space within header for actual message information */ + hsize_t free; /* Free space within object header */ } space; struct { - uint64_t present; /* Flags to indicate presence of message type in header */ - uint64_t shared; /* Flags to indicate message type is shared in header */ + uint64_t present; /* Flags to indicate presence of message type in header */ + uint64_t shared; /* Flags to indicate message type is shared in header */ } mesg; } H5O_hdr_info_t; /* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */ typedef struct H5O_info_t { - unsigned long fileno; /* File number that object is located in */ - haddr_t addr; /* Object address in file */ - H5O_type_t type; /* Basic object type (group, dataset, etc.) */ - unsigned rc; /* Reference count of object */ - time_t atime; /* Access time */ - time_t mtime; /* Modification time */ - time_t ctime; /* Change time */ - time_t btime; /* Birth time */ - hsize_t num_attrs; /* # of attributes attached to object */ + unsigned long fileno; /* File number that object is located in */ + haddr_t addr; /* Object address in file */ + H5O_type_t type; /* Basic object type (group, dataset, etc.) */ + unsigned rc; /* Reference count of object */ + time_t atime; /* Access time */ + time_t mtime; /* Modification time */ + time_t ctime; /* Change time */ + time_t btime; /* Birth time */ + hsize_t num_attrs; /* # of attributes attached to object */ H5O_hdr_info_t hdr; /* Object header information */ /* Extra metadata storage for obj & attributes */ struct { @@ -143,15 +143,14 @@ typedef herr_t (*H5O_iterate_t)(hid_t obj, const char *name, const H5O_info_t *i void *op_data); typedef enum H5O_mcdt_search_ret_t { - H5O_MCDT_SEARCH_ERROR = -1, /* Abort H5Ocopy */ - H5O_MCDT_SEARCH_CONT, /* Continue the global search of all committed datatypes in the destination file */ - H5O_MCDT_SEARCH_STOP /* Stop the search, but continue copying. The committed datatype will be copied but not merged. */ + H5O_MCDT_SEARCH_ERROR = -1, /* Abort H5Ocopy */ + H5O_MCDT_SEARCH_CONT, /* Continue the global search of all committed datatypes in the destination file */ + H5O_MCDT_SEARCH_STOP /* Stop the search, but continue copying. The committed datatype will be copied but not merged. */ } H5O_mcdt_search_ret_t; /* Callback to invoke when completing the search for a matching committed datatype from the committed dtype list */ typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data); - /********************/ /* Public Variables */ /********************/ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 721ba89..ddb070a 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -246,7 +246,7 @@ static hbool_t H5P_dcrt_def_layout_init_g = FALSE; static herr_t H5P__dcrt_reg_prop(H5P_genclass_t *pclass) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c index ace853a..5079548 100644 --- a/src/H5Plcpl.c +++ b/src/H5Plcpl.c @@ -48,7 +48,6 @@ #define H5L_CRT_INTERMEDIATE_GROUP_ENC H5P__encode_unsigned #define H5L_CRT_INTERMEDIATE_GROUP_DEC H5P__decode_unsigned - /******************/ /* Local Typedefs */ /******************/ @@ -119,7 +118,7 @@ static const unsigned H5L_def_intmd_group_g = H5L_CRT_INTERMEDIATE_GROUP_DEF; herr_t H5P_lcrt_reg_prop(H5P_genclass_t *pclass) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index f103647..627d4f2 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1241,10 +1241,10 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t H5T_class_t type_class; if((size = H5Tget_size(tid)) == 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed"); if((type_class = H5Tget_class(tid)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed"); switch (type_class) { case H5T_INTEGER: @@ -1264,7 +1264,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t bytes_wrote = HDfwrite(mem, 1, bytes_in, stream); if(bytes_wrote != bytes_in || (0 == bytes_wrote && HDferror(stream))) - H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed"); block_index -= (hsize_t)bytes_wrote; mem = mem + bytes_wrote; @@ -1287,7 +1287,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t if (s != NULL) size = HDstrlen(s); else - H5E_THROW(FAIL, H5E_tools_min_id_g, "NULL string") + H5E_THROW(FAIL, H5E_tools_min_id_g, "NULL string"); } else { s = (char *) mem; @@ -1295,7 +1295,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t for (i = 0; i < size && (s[i] || pad != H5T_STR_NULLTERM); i++) { HDmemcpy(&tempuchar, &s[i], sizeof(unsigned char)); if (1 != HDfwrite(&tempuchar, sizeof(unsigned char), 1, stream)) - H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed"); } /* i */ } /* for (block_index = 0; block_index < block_nelmts; block_index++) */ } @@ -1306,7 +1306,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t unsigned nmembs; if((snmembs = H5Tget_nmembers(tid)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers of compound failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers of compound failed"); nmembs = (unsigned)snmembs; for (block_index = 0; block_index < block_nelmts; block_index++) { @@ -1322,7 +1322,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t if (render_bin_output(stream, container, memb, mem + offset, 1) < 0) { H5Tclose(memb); - H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output of compound member failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output of compound member failed"); } H5Tclose(memb); @@ -1350,7 +1350,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t } else { H5Tclose(memb); - H5E_THROW(FAIL, H5E_tools_min_id_g, "calculate the number of array elements failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "calculate the number of array elements failed"); } for (block_index = 0; block_index < block_nelmts; block_index++) { @@ -1358,7 +1358,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t /* dump the array element */ if (render_bin_output(stream, container, memb, mem, nelmts) < 0) { H5Tclose(memb); - H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed"); } } H5Tclose(memb); @@ -1380,7 +1380,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t /* dump the array element */ if (render_bin_output(stream, container, memb, ((char *) (((hvl_t *)((void *)mem))->p)), nelmts) < 0) { H5Tclose(memb); - H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed"); } } H5Tclose(memb); @@ -1426,7 +1426,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t for (block_index = 0; block_index < block_nelmts; block_index++) { mem = ((unsigned char*)_mem) + block_index * size; if (size != HDfwrite(mem, sizeof(char), size, stream)) - H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed"); } /* end for */ break; @@ -1434,7 +1434,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t case H5T_NCLASSES: default: /* Badness */ - H5E_THROW(FAIL, H5E_tools_min_id_g, "bad type class") + H5E_THROW(FAIL, H5E_tools_min_id_g, "bad type class"); break; } /* end switch */ @@ -1562,12 +1562,12 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, hid_t type_id = -1; if((snblocks = H5Sget_select_hyper_nblocks(region_space)) <= 0) - H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed") + H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed"); nblocks = (hsize_t)snblocks; /* Print block information */ if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0) - H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed") + H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); ndims = (unsigned)sndims; alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]); @@ -1683,12 +1683,12 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id, hid_t type_id = -1; if((snpoints = H5Sget_select_elem_npoints(region_space)) <= 0) - H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed") + H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed"); npoints = (hsize_t)snpoints; /* Allocate space for the dimension array */ if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0) - H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed") + H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); ndims = (unsigned)sndims; if((dtype = H5Dget_type(region_id)) < 0) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index beb397c..eaac94a 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -618,12 +618,12 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, HDassert(buffer); if((snblocks = H5Sget_select_hyper_nblocks(region_space)) <= 0) - H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed") + H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed"); nblocks = (hsize_t)snblocks; /* Print block information */ if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0) - H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed") + H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); ndims = (unsigned)sndims; /* Render the region { element begin */ @@ -944,12 +944,12 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, HDassert(buffer); if((snpoints = H5Sget_select_elem_npoints(region_space)) <= 0) - H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed") + H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed"); npoints = (hsize_t)snpoints; /* Allocate space for the dimension array */ if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0) - H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed") + H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); ndims = (unsigned)sndims; /* Render the region { element begin */ @@ -1156,7 +1156,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c unsigned int vl_data = 0; /* contains VL datatypes */ if ((size_t) ctx->ndims > NELMTS(sm_size)) - H5E_THROW(FAIL, H5E_tools_min_id_g, "ndims and sm_size comparision failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "ndims and sm_size comparision failed"); if (ctx->ndims > 0) init_acc_pos(ctx, total_size); @@ -1184,10 +1184,10 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c /* calculate the potential number of elements we're going to print */ if(H5Sselect_hyperslab(f_space, H5S_SELECT_SET, temp_start, temp_stride, temp_count, temp_block) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); if((ssm_nelmts = H5Sget_select_npoints(f_space)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_npoints failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_npoints failed"); sm_nelmts = (hsize_t)ssm_nelmts; if (sm_nelmts > 0) { @@ -1196,7 +1196,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c * a hyperslab whose size is manageable. */ if((sm_nbytes = p_type_nbytes = H5Tget_size(p_type)) == 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed"); if (ctx->ndims > 0) for (i = ctx->ndims; i > 0; --i) { @@ -1210,17 +1210,17 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c HDassert(sm_nbytes == (hsize_t) ((size_t) sm_nbytes)); /*check for overflow*/ if(NULL == (sm_buf = (unsigned char *)HDmalloc((size_t) sm_nelmts * p_type_nbytes))) - H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for strip-mine") + H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for strip-mine"); if((sm_space = H5Screate_simple(1, &sm_nelmts, NULL)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed"); if(H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &sm_nelmts, NULL) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); /* read the data */ if(H5Dread(dset, p_type, sm_space, f_space, H5P_DEFAULT, sm_buf) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dread failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dread failed"); /* print the data */ flags = START_OF_DATA; @@ -1234,7 +1234,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c /* print array indices. get the lower bound of the hyperslab and calulate the element position at the start of hyperslab */ if(H5Sget_select_bounds(f_space, low, high) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_bounds failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_bounds failed"); elmtno = 0; for (i = 0; i < (size_t) ctx->ndims - 1; i++) { @@ -1259,13 +1259,13 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c H5Dvlen_reclaim(p_type, sm_space, H5P_DEFAULT, sm_buf); if(H5Sclose(sm_space) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed"); if(sm_buf) HDfree(sm_buf); sm_buf = NULL; } else - H5E_THROW(SUCCEED, H5E_tools_min_id_g, "nothing to print") + H5E_THROW(SUCCEED, H5E_tools_min_id_g, "nothing to print"); ctx->continuation++; @@ -1462,10 +1462,10 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co hsize_t total_size[H5S_MAX_RANK];/* total size of dataset*/ if((f_space = H5Dget_space(dset)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_space failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); if((sndims = H5Sget_simple_extent_ndims(f_space)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); ctx->ndims = (unsigned)sndims; /* assume entire data space to be printed */ @@ -1474,7 +1474,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co ctx->p_min_idx[i] = 0; if(H5Sget_simple_extent_dims(f_space, total_size, NULL) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed"); ctx->size_last_dim = total_size[ctx->ndims - 1]; /* Set the compound datatype field list for display */ @@ -1484,7 +1484,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co CATCH if(f_space >= 0 && H5Sclose(f_space) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed"); return ret_value; } @@ -1540,15 +1540,15 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont f_space = H5Dget_space(dset); if (f_space == FAIL) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_space failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); sndims = H5Sget_simple_extent_ndims(f_space); if(sndims < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_simple_extent_ndims failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_simple_extent_ndims failed"); ctx->ndims = (unsigned)sndims; if ((size_t)ctx->ndims > NELMTS(sm_size)) - H5E_THROW(FAIL, H5E_tools_min_id_g, "ctx->ndims > NELMTS(sm_size) failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "ctx->ndims > NELMTS(sm_size) failed"); /* Assume entire data space to be printed */ if (ctx->ndims > 0) @@ -1629,7 +1629,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont /* Read the data */ if (H5Dread(dset, p_type, sm_space, f_space, H5P_DEFAULT, sm_buf) < 0) { - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dread failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dread failed"); } /* Print the data */ @@ -1667,9 +1667,9 @@ CATCH done: if(sm_space >= 0 && H5Sclose(sm_space) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed"); if(f_space >= 0 && H5Sclose(f_space) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed"); return ret_value; } @@ -1696,11 +1696,11 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte sndims = H5Sget_simple_extent_ndims(space); if(sndims < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_simple_extent_ndims failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_simple_extent_ndims failed"); ctx->ndims = (unsigned)sndims; if ((size_t) ctx->ndims > NELMTS(ctx->p_min_idx)) - H5E_THROW(FAIL, H5E_tools_min_id_g, "ctx->ndims > NELMTS(ctx->p_min_idx) failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "ctx->ndims > NELMTS(ctx->p_min_idx) failed"); /* Assume entire data space to be printed */ for (i = 0; i < ctx->ndims; i++) @@ -1900,7 +1900,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ const char *order_s = NULL; /* byte order string */ if((type_class = H5Tget_class(type)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed"); if (object_search && H5Tcommitted(type) > 0) { H5O_info_t oinfo; obj_t *obj = NULL; /* Found object */ @@ -2280,9 +2280,9 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ char *ttag; if(NULL == (ttag = H5Tget_tag(type))) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_tag failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_tag failed"); - ctx->need_prefix = TRUE; + ctx->need_prefix = TRUE; h5tools_str_reset(buffer); h5tools_str_append(buffer, "OPAQUE_TAG \"%s\";", ttag); @@ -2308,7 +2308,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ case H5T_COMPOUND: if((snmembers = H5Tget_nmembers(type)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed"); nmembers = (unsigned)snmembers; h5tools_str_append(buffer, "H5T_COMPOUND %s", h5tools_dump_header_format->structblockbegin); @@ -2352,7 +2352,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ case H5T_ENUM: if((super = H5Tget_super(type)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed"); h5tools_str_append(buffer, "H5T_ENUM %s", h5tools_dump_header_format->enumblockbegin); h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -2382,14 +2382,14 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ case H5T_VLEN: if((super = H5Tget_super(type)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed"); h5tools_str_append(buffer, "H5T_VLEN %s ", h5tools_dump_header_format->vlenblockbegin); h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE); if(H5Tclose(super) < 0) - HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed") + HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed"); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->vlenblockend); @@ -2464,10 +2464,10 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space) int i; if((ndims = H5Sget_simple_extent_dims(space, size, maxsize)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed"); if((space_type = H5Sget_simple_extent_type(space)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_type failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_type failed"); switch(space_type) { case H5S_SCALAR: @@ -2552,15 +2552,15 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i ncols = info->line_ncols; if((snmembs = H5Tget_nmembers(type)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed"); nmembs = (unsigned)snmembs; HDassert(nmembs > 0); if((super = H5Tget_super(type)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed"); if((type_size = H5Tget_size(type)) <= 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size(type) failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size(type) failed"); /* * Determine what datatype to use for the native values. To simplify @@ -2573,7 +2573,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i dst_size = sizeof(long long); if((sign_type = H5Tget_sign(type))<0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_sign failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_sign failed"); if(H5T_SGN_NONE == sign_type) native = H5T_NATIVE_ULLONG; else @@ -2584,20 +2584,20 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i /* Get the names and raw values of all members */ if(NULL == (name = (char **)HDcalloc((size_t)nmembs, sizeof(char *)))) - H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for member name") + H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for member name"); if(NULL == (value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(type_size, dst_size)))) - H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for member value") + H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for member value"); for (i = 0; i < nmembs; i++) { name[i] = H5Tget_member_name(type, i); if(H5Tget_member_value(type, i, value + i * type_size) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_member_value failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_member_value failed"); } /* Convert values to native datatype */ if (native > 0) if(H5Tconvert(super, native, (size_t)nmembs, value, NULL, H5P_DEFAULT) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tconvert failed") + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tconvert failed"); /* * Sort members by increasing value @@ -2654,7 +2654,7 @@ CATCH HDfree(value); if(super >= 0 && H5Tclose(super) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not close datatype's super class") + H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not close datatype's super class"); if(0 == nmembs) h5tools_str_append(buffer, "\n"); @@ -3223,7 +3223,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, *------------------------------------------------------------------------- */ if (H5D_VIRTUAL != stl) { - ctx->need_prefix = TRUE; + ctx->need_prefix = TRUE; h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", FILTERS, BEGIN); diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index b1e736a..0579f63 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -1641,8 +1641,7 @@ main(int argc, const char *argv[]) fid = H5Fopen(fname, H5F_ACC_RDONLY, fapl_id); } else { - fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, - driver, NULL, 0); + fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, driver, NULL, 0); } if (fid < 0) { -- cgit v0.12