diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-07-21 16:11:56 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-07-21 16:11:56 (GMT) |
commit | bdce66f69a4f976fd3013c54b0f8f9f137bff8f5 (patch) | |
tree | 8675786e9819eb9a0234ab2c250abd2753438f7d /src | |
parent | 2423411a647cff2bc2c37789fc9973ed4a683348 (diff) | |
download | hdf5-bdce66f69a4f976fd3013c54b0f8f9f137bff8f5.zip hdf5-bdce66f69a4f976fd3013c54b0f8f9f137bff8f5.tar.gz hdf5-bdce66f69a4f976fd3013c54b0f8f9f137bff8f5.tar.bz2 |
[svn-r523] Changes since 19980720
----------------------
./test/dtypes.c
We try to detect whether floating point overflow generates a
SIGFPE and if it does we don't test overflow cases.
./test/H5Sprivate.h
./test/H5S.c
./test/H5Oattr.c
Added an H5S_debug() which is called from H5O_attr_debug() and
which has a switch statement to handle the various data type
messages.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Oattr.c | 2 | ||||
-rw-r--r-- | src/H5S.c | 46 | ||||
-rw-r--r-- | src/H5Sprivate.h | 2 |
3 files changed, 49 insertions, 1 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 99551ee..eaa80ba 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -429,7 +429,7 @@ H5O_attr_debug(H5F_t *f, const void *_mesg, FILE * stream, intn indent, "Data space size:", (unsigned long)(mesg->ds_size)); fprintf(stream, "%*sData space...\n", indent, ""); - (H5O_SDSPACE->debug)(f, mesg->ds, stream, indent+3, MAX(0, fwidth-3)); + H5S_debug(f, mesg->ds, stream, indent+3, MAX(0, fwidth-3)); FUNC_LEAVE(SUCCEED); } @@ -1429,3 +1429,49 @@ H5Screate_simple (int rank, const hsize_t *dims, const hsize_t *maxdims) if (ret_value<0 && space) H5S_close(space); FUNC_LEAVE(ret_value); } + + +/*------------------------------------------------------------------------- + * Function: H5S_debug + * + * Purpose: Prints debugging information about a data space. + * + * Return: Success: SUCCEED + * + * Failure: FAIL + * + * Programmer: Robb Matzke + * Tuesday, July 21, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, intn indent, intn fwidth) +{ + const H5S_t *mesg = (const H5S_t*)_mesg; + + FUNC_ENTER(H5S_debug, FAIL); + + switch (mesg->extent.type) { + case H5S_SCALAR: + fprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth, + "Space class:"); + break; + + case H5S_SIMPLE: + fprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth, + "Space class:"); + (H5O_SDSPACE->debug)(f, &(mesg->extent.u.simple), stream, + indent+3, MAX(0, fwidth-3)); + break; + + default: + fprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth, + "Space class:", (long)(mesg->extent.type)); + break; + } + + FUNC_LEAVE(SUCCEED); +} diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 35371ba..e5aeabc 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -226,6 +226,8 @@ hsize_t H5S_select_npoints (const H5S_t *space); intn H5S_extend (H5S_t *space, const hsize_t *size); herr_t H5S_set_extent_simple (H5S_t *space, int rank, const hsize_t *dims, const hsize_t *max); +herr_t H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, intn indent, + intn fwidth); /* Conversion functions for simple data spaces */ size_t H5S_simp_init (const struct H5O_layout_t *layout, |