[svn-r925] Changes since 19981116

----------------------

./INSTALL.parallel	[NEW]
	We're beginning to unify some of the parallel installation
	steps.  This file will contain general information for
	installing the parallel library.  It's not complete yet.

./configure.in
./configure		[REGENERATED]
./src/H5config.h.in	[REGENERATED]
	Check for xdr_int() in libnsl required on Solaris when linking
	with hdf4.  It's found on the Irix system I tested which
	complains that `-lnsl' didn't resolve any symbols. Oh well.

	Fixed the order of searching for libdf and libmfhdf for hdf4
	linking.

./configure.in
./configure		[REGENERATED]
./src/H5config.h.in	[REGENERATED]
./src/H5Z.c
	Check for compress() in libz in order to find older versions
	of the library that will still work for hdf4.  Added a
	separate check for compress2() that hdf5 will use.

./configure.in
./configure		[REGENERATED]
./src/H5config.h.in	[REGENERATED]
./src/H5.c
./src/H5private.h
./src/H5A.c
./src/H5B.c
./src/H5Bprivate.h
./src/H5D.c
./src/H5F.c
./src/H5Farray.c
./src/H5Fcore.c
./src/H5Ffamily.c
./src/H5Fistore.c
./src/H5Flow.c
./src/H5Fmpio.c
./src/H5Fprivate.h
./src/H5Fsec2.c
./src/H5Fsplit.c
./src/H5Fstdio.c
./src/H5Gent.c
./src/H5Gnode.c
./src/H5Gpkg.h
./src/H5Gprivate.h
./src/H5HG.c
./src/H5HL.c
./src/H5O.c
./src/H5Oattr.c
./src/H5Ocomp.c
./src/H5Ocont.c
./src/H5Odtype.c
./src/H5Oefl.c
./src/H5Ofill.c
./src/H5Olayout.c
./src/H5Omtime.c
./src/H5Oname.c
./src/H5Oprivate.h
./src/H5Osdspace.c
./src/H5Oshared.c
./src/H5Ostab.c
./src/H5R.c
./src/H5RA.c
./src/H5Sall.c
./src/H5Shyper.c
./src/H5Snone.c
./src/H5Spoint.c
./src/H5Sprivate.h
./src/H5Sselect.c
./src/H5T.c
./src/H5Tbit.c
./src/H5Tconv.c
./src/H5Tpkg.h
./src/H5V.c
./test/bittests.c
./test/gheap.c
./test/hyperslab.c
./test/istore.c
./test/tmeta.c
./test/trefer.c
./test/tselect.c
./tools/h5debug.c
./tools/h5tols.c
	Added checks for Posix.1g types like `int8_t'.  If not defined
	then H5private.h defines them.  Changed all `int8' etc. to
	`int8_t'.

./src/H5A.c
./src/H5D.c
./src/H5F.c
./src/H5G.c
./src/H5I.c
./src/H5P.c
./src/H5R.c
./src/H5RA.c
./src/H5S.c
./src/H5T.c
./src/H5TB.c
./src/H5Z.c
	Calling H5*_term_interface() resets interface_initialize_g to
	FALSE so a subsequent call to H5open() (implied or explicit)
	reinitializes global variables properly.

./src/H5private.h
./src/H5Oefl.c
./src/H5S.c
	Changed MAX_SIZET, MAX_SSIZET, MAX_HSIZET, and MAX_HSSIZET to
	SIZET_MAX, SSIZET_MAX, HSIZET_MAX, and HSSIZE_MAX to they
	match the Posix.1 constants in <limits.h>.

./src/H5T.c
./src/H5Tconv.c
./src/H5Tpkg.h
./src/H5Tprivate.h
./src/H5detect.c
	Added 36 more integer hardware conversion functions to the
	type conversion table for conversions to/from `long long' and
	`unsigned long long'.  The `long long' names will be changed
	shortly to make them portable to Win32.

	Changed H5T_init() to H5T_native_open() and added an
	H5T_native_close() to open and close the predefined native
	data types.

	Increased the initial size of the type conversion table from
	64 to 128 entries.

	Reordered the 90 new integer conversion functions so the names
	that are printed favor `int' over `short' or `long' when two
	of them are the same.

./test/dtypes.c
	Added hardware and software integer conversion tests for the
	56 functions I added recently but not the additional 36
	checked in this time.  That will come next.

	Call H5close() after each test so type conversion statistics
	are easier to follow.  Try this: $ HDF5_DEBUG=t ./dtypes

	Added more debugging output for when things go wrong.

./src/H5private.h
	Removed trailing carriage-returns inserted by broken operating
	system ;-)
This commit is contained in:
Robb Matzke 1998-11-18 13:40:09 -05:00
parent 8aa4f54200
commit 8bb8649482
77 changed files with 4443 additions and 1117 deletions

28
INSTALL.parallel Normal file
View File

@ -0,0 +1,28 @@
This file contains instructions for the installation a version of HDF5
that uses the parallel file I/O facilities of the MPI-IO library. A
parallel version of HDF5 can run in a serial environment as long as
the appropriate MPI-IO and MPI header files and libraries are
available.
The parallel version of hdf5 can be build by generally following the
instructions in the INSTALL file for building a serial version and
using `mpicc' as the C compiler. This can be done by setting the CC
environment variable before invoking configure as with:
$ CC=mpicc ./configure
If the mpicc compiler is not available then a parallel library can
still be built as long as the appropriate header files and libraries
can be found. If these files are part of the default compiler search
paths then configuration is as simple as:
$ ./configure --enable-parallel
Otherwise, if the MPI and MPI-IO header files or library cannot be
found then the compiler search paths can be corrected, the files can
be moved, or configure can be told about the file locations. The
latter is done with something like:
$ CPPFLAGS=-I/usr/local/mpi/include \
LDFLAGS=-L/usr/local/mpi/lib/LINUX/ch_p4 \
./configure --enable-parallel

2
README
View File

@ -1,4 +1,4 @@
This is hdf5-1.1.27 released on Fri Nov 13 04:20:29 CST 1998
This is hdf5-1.1.28 released on Wed Nov 18 10:21:47 CST 1998
Please refer to the INSTALL file for installation instructions.
------------------------------------------------------------------------------

1021
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -124,8 +124,9 @@ esac
dnl ----------------------------------------------------------------------
dnl Check for system libraries.
dnl
AC_CHECK_LIB(m, ceil)
AC_CHECK_LIB(coug, main) dnl ...for ASCI/Red
AC_CHECK_LIB(m,ceil)
AC_CHECK_LIB(nsl,xdr_int) dnl ...for Solaris and hdf4
AC_CHECK_LIB(coug,main) dnl ...for ASCI/Red
AC_CHECK_LIB(jpeg,main) dnl ...required for linking hdf4 apps
dnl ----------------------------------------------------------------------
@ -151,6 +152,20 @@ AC_CHECK_SIZEOF(__int64, 8)
AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(long double, 8)
dnl Posix.1g types
cat >>confdefs.h <<\EOF
#include <sys/types.h>
EOF
AC_CHECK_SIZEOF( int8_t, 1)
AC_CHECK_SIZEOF( uint8_t, 1)
AC_CHECK_SIZEOF( int16_t, 2)
AC_CHECK_SIZEOF(uint16_t, 2)
AC_CHECK_SIZEOF( int32_t, 4)
AC_CHECK_SIZEOF(uint32_t, 4)
AC_CHECK_SIZEOF( int64_t, 8)
AC_CHECK_SIZEOF(uint64_t, 8)
AC_CHECK_SIZEOF(size_t, 4)
cat >>confdefs.h <<\EOF
#include <sys/types.h> /*for off_t definition*/
@ -188,7 +203,7 @@ AC_ARG_WITH(zlib,[ --with-zlib=INC,LIB Use the GNU zlib compression],
case $withval in
yes)
AC_CHECK_HEADERS(zlib.h)
AC_CHECK_LIB(z, compress2)
AC_CHECK_LIB(z, compress)
;;
no)
AC_MSG_CHECKING(for GNU zlib)
@ -208,9 +223,9 @@ case $withval in
if test "X" != "$zlb_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$zlib_lib"
AC_CHECK_LIB(z, compress2,,LDFLAGS="$saved_LDFLAGS")
AC_CHECK_LIB(z, compress,,LDFLAGS="$saved_LDFLAGS")
else
AC_CHECK_LIB(z, compress2)
AC_CHECK_LIB(z, compress)
fi
;;
esac
@ -229,8 +244,8 @@ AC_ARG_WITH(hdf4,[ --with-hdf4=INC,LIB Use the HDF4 library],,withval=yes)
case $withval in
yes)
AC_CHECK_HEADERS(mfhdf.h,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(df,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
;;
no)
AC_MSG_CHECKING(for HDF4)
@ -254,11 +269,11 @@ case $withval in
if test "X" != "$hdf4_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$hdf4_lib"
AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(df,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
else
AC_CHECK_LIB(mfhdf,main)
AC_CHECK_LIB(df,main)
AC_CHECK_LIB(mfhdf,main)
fi
;;
esac
@ -312,7 +327,7 @@ dnl ----------------------------------------------------------------------
dnl How do we figure out the width of a tty in characters?
dnl
AC_CHECK_FUNCS(_getvideoconfig gettextinfo GetConsoleScreenBufferInfo)
AC_CHECK_FUNCS(_scrsize ioctl)
AC_CHECK_FUNCS(_scrsize ioctl compress2)
AC_MSG_CHECKING(for struct videoconfig)
AC_TRY_COMPILE(,[struct videoconfig w; w.numtextcols=0;],

View File

@ -1019,6 +1019,32 @@ H5Smpio.o: \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h
H5Snone.o: \
H5Snone.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Vprivate.h
H5Spoint.o: \
H5Spoint.c \
H5private.h \

View File

@ -709,7 +709,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
long x = va_arg (ap, long);
n = fprintf (stream, template, x);
} else {
int64 x = va_arg(ap, int64);
int64_t x = va_arg(ap, int64_t);
n = fprintf (stream, template, x);
}
break;
@ -728,7 +728,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
unsigned long x = va_arg (ap, unsigned long);
n = fprintf (stream, template, x);
} else {
uint64 x = va_arg(ap, uint64);
uint64_t x = va_arg(ap, uint64_t);
n = fprintf (stream, template, x);
}
break;
@ -837,7 +837,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
/*-------------------------------------------------------------------------
* Function: HDstrtoll
*
* Purpose: Converts the string S to an int64 value according to the
* Purpose: Converts the string S to an int64_t value according to the
* given BASE, which must be between 2 and 36 inclusive, or be
* the special value zero.
*
@ -849,7 +849,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
* unless the next character is a `0', in which case it is taken
* as 8 (octal).
*
* The remainder of the string is converted to an int64 in the
* The remainder of the string is converted to an int64_t in the
* obvious manner, stopping at the first character which is not
* a valid digit in the given base. (In bases above 10, the
* letter `A' in either upper or lower case represetns 10, `B'
@ -878,10 +878,10 @@ HDfprintf (FILE *stream, const char *fmt, ...)
*
*-------------------------------------------------------------------------
*/
int64
int64_t
HDstrtoll (const char *s, const char **rest, int base)
{
int64 sign=1, acc=0;
int64_t sign=1, acc=0;
hbool_t overflow = FALSE;
errno = 0;
@ -918,7 +918,7 @@ HDstrtoll (const char *s, const char **rest, int base)
(*s>='a' && *s<'a'+base-10) ||
(*s>='A' && *s<'A'+base-10)))) {
if (!overflow) {
int64 digit = 0;
int64_t digit = 0;
if (*s>='0' && *s<='9') digit = *s - '0';
else if (*s>='a' && *s<='z') digit = *s-'a'+10;
else digit = *s-'A'+10;
@ -935,9 +935,9 @@ HDstrtoll (const char *s, const char **rest, int base)
/* Overflow */
if (overflow) {
if (sign>0) {
acc = ((uint64)1<<(8*sizeof(int64)-1))-1;
acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1;
} else {
acc = (uint64)1<<(8*sizeof(int64)-1);
acc = (uint64_t)1<<(8*sizeof(int64_t)-1);
}
errno = ERANGE;
}

View File

@ -107,6 +107,7 @@ static void
H5A_term_interface(void)
{
H5I_destroy_group(H5I_ATTR);
interface_initialize_g = FALSE;
}
@ -609,7 +610,7 @@ H5Awrite(hid_t attr_id, hid_t type_id, void *buf)
static herr_t
H5A_write(H5A_t *attr, const H5T_t *mem_type, void *buf)
{
uint8 *tconv_buf = NULL; /* data type conv buffer */
uint8_t *tconv_buf = NULL; /* data type conv buffer */
size_t nelmts; /* elements in attribute */
H5T_conv_t tconv_func = NULL; /* conversion function */
H5T_cdata_t *cdata = NULL; /* type conversion data */
@ -780,7 +781,7 @@ H5Aread(hid_t attr_id, hid_t type_id, void *buf)
static herr_t
H5A_read(H5A_t *attr, const H5T_t *mem_type, void *buf)
{
uint8 *tconv_buf = NULL; /* data type conv buffer*/
uint8_t *tconv_buf = NULL; /* data type conv buffer*/
size_t nelmts; /* elements in attribute*/
H5T_conv_t tconv_func = NULL; /* conversion function */
H5T_cdata_t *cdata = NULL; /* type conversion data */
@ -1389,7 +1390,7 @@ H5A_close(H5A_t *attr)
/* Check if the attribute has any data yet, if not, fill with zeroes */
if(attr->ent_opened && !attr->initialized) {
uint8 *tmp_buf=H5MM_calloc(attr->data_size);
uint8_t *tmp_buf=H5MM_calloc(attr->data_size);
if (NULL == tmp_buf) {
HRETURN_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL,
"memory allocation failed for attribute fill-value");

View File

@ -103,10 +103,10 @@
static H5B_ins_t H5B_insert_helper(H5F_t *f, const haddr_t *addr,
const H5B_class_t *type,
const double split_ratios[],
uint8 *lt_key,
uint8_t *lt_key,
hbool_t *lt_key_changed,
uint8 *md_key, void *udata,
uint8 *rt_key,
uint8_t *md_key, void *udata,
uint8_t *rt_key,
hbool_t *rt_key_changed,
haddr_t *retval);
static herr_t H5B_insert_child(H5F_t *f, const H5B_class_t *type,
@ -285,7 +285,7 @@ H5B_load(H5F_t *f, const haddr_t *addr, const void *_type, void *udata)
size_t size, total_nkey_size;
H5B_t *bt = NULL;
intn i;
uint8 *p;
uint8_t *p;
H5B_t *ret_value = NULL;
FUNC_ENTER(H5B_load, NULL);
@ -336,8 +336,8 @@ H5B_load(H5F_t *f, const haddr_t *addr, const void *_type, void *udata)
UINT16DECODE(p, bt->nchildren);
/* sibling pointers */
H5F_addr_decode(f, (const uint8 **) &p, &(bt->left));
H5F_addr_decode(f, (const uint8 **) &p, &(bt->right));
H5F_addr_decode(f, (const uint8_t **) &p, &(bt->left));
H5F_addr_decode(f, (const uint8_t **) &p, &(bt->right));
/* the child/key pairs */
for (i = 0; i < 2 * H5B_K(f, type); i++) {
@ -348,7 +348,7 @@ H5B_load(H5F_t *f, const haddr_t *addr, const void *_type, void *udata)
bt->key[i].nkey = NULL;
if (i < bt->nchildren) {
H5F_addr_decode(f, (const uint8 **) &p, bt->child + i);
H5F_addr_decode(f, (const uint8_t **) &p, bt->child + i);
} else {
H5F_addr_undef(bt->child + i);
p += H5F_SIZEOF_ADDR(f);
@ -392,7 +392,7 @@ H5B_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5B_t *bt)
{
intn i;
size_t size = 0;
uint8 *p = bt->page;
uint8_t *p = bt->page;
FUNC_ENTER(H5B_flush, FAIL);
@ -840,17 +840,17 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
/*
* These are defined this way to satisfy alignment constraints.
*/
uint64 _lt_key[128], _md_key[128], _rt_key[128];
uint8 *lt_key=(uint8*)_lt_key;
uint8 *md_key=(uint8*)_md_key;
uint8 *rt_key=(uint8*)_rt_key;
uint64_t _lt_key[128], _md_key[128], _rt_key[128];
uint8_t *lt_key=(uint8_t*)_lt_key;
uint8_t *md_key=(uint8_t*)_md_key;
uint8_t *rt_key=(uint8_t*)_rt_key;
hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
haddr_t child, old_root;
intn level;
H5B_t *bt;
size_t size;
uint8 *buf = NULL;
uint8_t *buf = NULL;
H5B_ins_t my_ins = H5B_INS_ERROR;
herr_t ret_value = FAIL;
@ -1128,9 +1128,9 @@ H5B_insert_child(H5F_t *f, const H5B_class_t *type, H5B_t *bt,
*/
static H5B_ins_t
H5B_insert_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
const double split_ratios[], uint8 *lt_key,
hbool_t *lt_key_changed, uint8 *md_key, void *udata,
uint8 *rt_key, hbool_t *rt_key_changed,
const double split_ratios[], uint8_t *lt_key,
hbool_t *lt_key_changed, uint8_t *md_key, void *udata,
uint8_t *rt_key, hbool_t *rt_key_changed,
haddr_t *new_node/*out*/)
{
H5B_t *bt = NULL, *twin = NULL, *tmp_bt = NULL;
@ -1590,9 +1590,9 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
*/
static H5B_ins_t
H5B_remove_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
intn level, uint8 *lt_key/*out*/,
intn level, uint8_t *lt_key/*out*/,
hbool_t *lt_key_changed/*out*/, void *udata,
uint8 *rt_key/*out*/, hbool_t *rt_key_changed/*out*/)
uint8_t *rt_key/*out*/, hbool_t *rt_key_changed/*out*/)
{
H5B_t *bt = NULL, *sibling = NULL;
H5B_ins_t ret_value = H5B_INS_ERROR;
@ -1874,9 +1874,9 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
void *udata)
{
/* These are defined this way to satisfy alignment constraints */
uint64 _lt_key[128], _rt_key[128];
uint8 *lt_key = (uint8*)_lt_key; /*left key*/
uint8 *rt_key = (uint8*)_rt_key; /*right key*/
uint64_t _lt_key[128], _rt_key[128];
uint8_t *lt_key = (uint8_t*)_lt_key; /*left key*/
uint8_t *rt_key = (uint8_t*)_rt_key; /*right key*/
hbool_t lt_key_changed = FALSE; /*left key changed?*/
hbool_t rt_key_changed = FALSE; /*right key changed?*/
H5B_t *bt = NULL; /*btree node */

View File

@ -89,8 +89,8 @@ typedef struct H5B_class_t {
void*, void*, hbool_t*);
herr_t (*list)(H5F_t*, const haddr_t*, void*); /*walk leaf nodes*/
herr_t (*decode)(H5F_t*, struct H5B_t*, uint8*, void*);
herr_t (*encode)(H5F_t*, struct H5B_t*, uint8*, void*);
herr_t (*decode)(H5F_t*, struct H5B_t*, uint8_t*, void*);
herr_t (*encode)(H5F_t*, struct H5B_t*, uint8_t*, void*);
herr_t (*debug_key)(FILE*, intn, intn, const void*, const void*);
} H5B_class_t;
@ -99,7 +99,7 @@ typedef struct H5B_class_t {
*/
typedef struct H5B_key_t {
hbool_t dirty; /*native key is more recent than raw key */
uint8 *rkey; /*ptr into node->page for raw key */
uint8_t *rkey; /*ptr into node->page for raw key */
void *nkey; /*null or ptr into node->native for key */
} H5B_key_t;
@ -112,8 +112,8 @@ typedef struct H5B_t {
haddr_t left; /*address of left sibling */
haddr_t right; /*address of right sibling */
intn nchildren; /*number of child pointers */
uint8 *page; /*disk page */
uint8 *native; /*array of keys in native format */
uint8_t *page; /*disk page */
uint8_t *native; /*array of keys in native format */
H5B_key_t *key; /*2k+1 key entries */
haddr_t *child; /*2k child pointers */
} H5B_t;

View File

@ -148,6 +148,7 @@ static void
H5D_term_interface(void)
{
H5I_destroy_group(H5I_DATASET);
interface_initialize_g = FALSE;
}
/*-------------------------------------------------------------------------
@ -1448,8 +1449,8 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
size_t smine_start; /*strip mine start loc */
size_t n, smine_nelmts; /*elements per strip */
hid_t tconv_id=FAIL, bkg_id=FAIL; /* Conversion buffer IDs */
uint8 *tconv_buf = NULL; /*data type conv buffer */
uint8 *bkg_buf = NULL; /*background buffer */
uint8_t *tconv_buf = NULL; /*data type conv buffer */
uint8_t *bkg_buf = NULL; /*background buffer */
H5T_conv_t tconv_func = NULL; /*conversion function */
hid_t src_id = -1, dst_id = -1;/*temporary type atoms */
H5S_conv_t *sconv=NULL; /*space conversion funcs*/
@ -1684,7 +1685,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
printf("%s: check 6.5\n",FUNC);
{
int i;
uint16 *b;
uint16_t *b;
if(qak_debug) {
b=tconv_buf;
@ -1807,8 +1808,8 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
size_t smine_start; /*strip mine start loc */
size_t n, smine_nelmts; /*elements per strip */
hid_t tconv_id=FAIL, bkg_id=FAIL; /* Conversion buffer IDs */
uint8 *tconv_buf = NULL; /*data type conv buffer */
uint8 *bkg_buf = NULL; /*background buffer */
uint8_t *tconv_buf = NULL; /*data type conv buffer */
uint8_t *bkg_buf = NULL; /*background buffer */
H5T_conv_t tconv_func = NULL; /*conversion function */
hid_t src_id = -1, dst_id = -1;/*temporary type atoms */
H5S_conv_t *sconv=NULL; /*space conversion funcs*/
@ -2050,7 +2051,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
#ifdef QAK
{
int i;
uint16 *b;
uint16_t *b;
if(qak_debug) {
b=tconv_buf;

View File

@ -86,7 +86,7 @@ typedef struct H5F_rdcc_ent_t {
size_t wr_count; /*bytes remaining to be written */
size_t chunk_size; /*size of a chunk */
size_t alloc_size; /*amount allocated for the chunk */
uint8 *chunk; /*the unfiltered chunk data */
uint8_t *chunk; /*the unfiltered chunk data */
intn idx; /*index in hash table */
struct H5F_rdcc_ent_t *next;/*next item in doubly-linked list */
struct H5F_rdcc_ent_t *prev;/*previous item in doubly-linked list */
@ -108,9 +108,9 @@ static H5B_ins_t H5F_istore_insert(H5F_t *f, const haddr_t *addr,
void *_md_key, void *_udata,
void *_rt_key, hbool_t *rt_key_changed,
haddr_t *new_node/*out*/);
static herr_t H5F_istore_decode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
static herr_t H5F_istore_decode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
static herr_t H5F_istore_encode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
static herr_t H5F_istore_encode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
static herr_t H5F_istore_debug_key (FILE *stream, intn indent, intn fwidth,
const void *key, const void *udata);
@ -228,7 +228,7 @@ H5F_istore_sizeof_rkey(H5F_t __unused__ *f, const void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8_t *raw, void *_key)
{
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
intn i;
@ -269,7 +269,7 @@ H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
H5F_istore_encode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
H5F_istore_encode_key(H5F_t __unused__ *f, H5B_t *bt, uint8_t *raw, void *_key)
{
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
intn ndims = H5F_ISTORE_NDIMS(bt);
@ -506,7 +506,7 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op,
rt_key->nbytes = 0;
rt_key->filter_mask = 0;
for (i=0; i<udata->mesg.ndims; i++) {
assert (udata->mesg.dim[i] < MAX_HSSIZET);
assert (udata->mesg.dim[i] < HSSIZET_MAX);
assert (udata->key.offset[i]+(hssize_t)(udata->mesg.dim[i]) >
udata->key.offset[i]);
rt_key->offset[i] = udata->key.offset[i] +
@ -1434,7 +1434,7 @@ H5F_istore_unlock (H5F_t *f, const H5O_layout_t *layout,
const double split_ratios[],
const H5O_pline_t *pline, hbool_t dirty,
const hssize_t offset[], intn *idx_hint,
uint8 *chunk, size_t naccessed)
uint8_t *chunk, size_t naccessed)
{
H5F_rdcc_t *rdcc = &(f->shared->rdcc);
H5F_rdcc_ent_t *ent = NULL;
@ -1527,7 +1527,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
intn i, carry;
size_t naccessed; /*bytes accessed in chnk*/
uint8 *chunk=NULL; /*ptr to a chunk buffer */
uint8_t *chunk=NULL; /*ptr to a chunk buffer */
intn idx_hint=0; /*cache index hint */
FUNC_ENTER(H5F_istore_read, FAIL);
@ -1554,7 +1554,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0; i<layout->ndims; i++) {
assert (offset_f[i]>=0); /*negative offsets not supported*/
assert (offset_m[i]>=0); /*negative offsets not supported*/
assert (size[i]<MAX_SIZET);
assert (size[i]<SIZET_MAX);
assert(offset_m[i]+(hssize_t)size[i]<=(hssize_t)size_m[i]);
assert(layout->dim[i]>0);
}
@ -1575,7 +1575,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
while (1) {
for (i=0, naccessed=1; i<layout->ndims; i++) {
/* The location and size of the chunk being accessed */
assert (layout->dim[i] < MAX_HSSIZET);
assert (layout->dim[i] < HSSIZET_MAX);
chunk_offset[i] = idx_cur[i] * (hssize_t)(layout->dim[i]);
/* The offset and size wrt the chunk */
@ -1697,7 +1697,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
hssize_t offset_wrt_chunk[H5O_LAYOUT_NDIMS];
hssize_t sub_offset_m[H5O_LAYOUT_NDIMS];
uint8 *chunk=NULL;
uint8_t *chunk=NULL;
intn idx_hint=0;
size_t chunk_size, naccessed;
@ -1726,7 +1726,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0; i<layout->ndims; i++) {
assert (offset_f[i]>=0); /*negative offsets not supported*/
assert (offset_m[i]>=0); /*negative offsets not supported*/
assert(size[i]<MAX_SIZET);
assert(size[i]<SIZET_MAX);
assert(offset_m[i]+(hssize_t)size[i]<=(hssize_t)size_m[i]);
assert(layout->dim[i]>0);
}
@ -1749,7 +1749,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0, naccessed=1; i<layout->ndims; i++) {
/* The location and size of the chunk being accessed */
assert (layout->dim[i] < MAX_HSSIZET);
assert (layout->dim[i] < HSSIZET_MAX);
chunk_offset[i] = idx_cur[i] * (hssize_t)(layout->dim[i]);
/* The offset and size wrt the chunk */
@ -2064,7 +2064,7 @@ H5F_istore_allocate (H5F_t *f, const H5O_layout_t *layout,
intn i, carry;
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
uint8 *chunk=NULL;
uint8_t *chunk=NULL;
intn idx_hint=0;
size_t chunk_size;
#ifdef AKC

View File

@ -215,6 +215,7 @@ static void
H5F_term_interface(void)
{
H5I_destroy_group(H5I_FILE);
interface_initialize_g = FALSE;
}
@ -224,8 +225,8 @@ H5F_term_interface(void)
USAGE
void H5F_encode_length_unusual(f, p, l)
const H5F_t *f; IN: pointer to the file record
uint8 **p; IN: pointer to buffer pointer to encode length in
uint8 *l; IN: pointer to length to encode
uint8_t **p; IN: pointer to buffer pointer to encode length in
uint8_t *l; IN: pointer to length to encode
ERRORS
@ -235,7 +236,7 @@ H5F_term_interface(void)
Encode non-standard (i.e. not 2, 4 or 8-byte) lengths in file meta-data.
--------------------------------------------------------------------------*/
void
H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l)
H5F_encode_length_unusual(const H5F_t *f, uint8_t **p, uint8_t *l)
{
intn i = (intn)H5F_SIZEOF_SIZE(f)-1;
@ -411,9 +412,9 @@ H5F_locate_signature(H5F_low_t *f_handle, const H5F_access_t *access_parms,
haddr_t *addr/*out*/)
{
herr_t ret_value=FAIL;
haddr_t max_addr;
uint8 buf[H5F_SIGNATURE_LEN];
uintn n = 9;
haddr_t max_addr;
uint8_t buf[H5F_SIGNATURE_LEN];
uintn n = 9;
FUNC_ENTER(H5F_locate_signature, FAIL);
@ -765,8 +766,8 @@ H5F_open(const char *name, uintn flags,
H5F_low_t *fd = NULL; /*low level file desc */
hbool_t empty_file = FALSE; /*is file empty? */
hbool_t file_exists = FALSE; /*file already exists */
uint8 buf[256]; /*I/O buffer.. */
const uint8 *p = NULL; /* ..and pointer into it */
uint8_t buf[256]; /*I/O buffer.. */
const uint8_t *p = NULL; /* ..and pointer into it */
size_t fixed_size = 24; /*size of fixed part of boot blk*/
size_t variable_size; /*variable part of boot block */
H5F_create_t *cp = NULL; /*file creation parameters */
@ -1453,7 +1454,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope)
static herr_t
H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate)
{
uint8 buf[2048], *p = buf;
uint8_t buf[2048], *p = buf;
haddr_t reserved_addr;
uintn nerrors=0, i;
@ -1504,9 +1505,9 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate)
*p++ = 0; /*reserved*/
*p++ = f->shared->create_parms->sharedheader_ver;
assert (H5F_SIZEOF_ADDR(f)<=255);
*p++ = (uint8)H5F_SIZEOF_ADDR(f);
*p++ = (uint8_t)H5F_SIZEOF_ADDR(f);
assert (H5F_SIZEOF_SIZE(f)<=255);
*p++ = (uint8)H5F_SIZEOF_SIZE(f);
*p++ = (uint8_t)H5F_SIZEOF_SIZE(f);
*p++ = 0; /*reserved */
UINT16ENCODE(p, f->shared->create_parms->sym_leaf_k);
UINT16ENCODE(p, f->shared->create_parms->btree_k[H5B_SNODE_ID]);
@ -1675,7 +1676,7 @@ H5F_close(H5F_t *f)
USAGE
herr_t H5Fclose(file_id)
int32 file_id; IN: File ID of file to close
int32_t file_id; IN: File ID of file to close
ERRORS
ARGS BADTYPE Not a file atom.
@ -2196,7 +2197,7 @@ H5F_block_read(H5F_t *f, const haddr_t *addr, hsize_t size,
FUNC_ENTER(H5F_block_read, FAIL);
assert (size < MAX_SIZET);
assert (size < SIZET_MAX);
/* convert the relative address to an absolute address */
abs_addr = f->shared->base_addr;
@ -2241,7 +2242,7 @@ H5F_block_write(H5F_t *f, const haddr_t *addr, hsize_t size,
FUNC_ENTER(H5F_block_write, FAIL);
assert (size < MAX_SIZET);
assert (size < SIZET_MAX);
if (0 == (f->intent & H5F_ACC_RDWR)) {
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "no write intent");

View File

@ -8,7 +8,7 @@
* Purpose: Provides I/O facilities for multi-dimensional arrays of bytes
* stored with various layout policies. If the caller is
* interested in arrays of elements >1 byte then add an extra
* dimension. For example, a 10x20 array of int32 would
* dimension. For example, a 10x20 array of int would
* translate to a 10x20x4 array of bytes at this level.
*/
#include <H5private.h>
@ -120,7 +120,7 @@ H5F_arr_read (H5F_t *f, const H5D_xfer_t *xfer,
const hsize_t mem_size[], const hssize_t mem_offset[],
const hssize_t file_offset[], void *_buf/*out*/)
{
uint8 *buf = (uint8 *)_buf; /*cast for arithmetic */
uint8_t *buf = (uint8_t*)_buf; /*cast for arithmetic */
hssize_t file_stride[H5O_LAYOUT_NDIMS]; /*strides through file */
hssize_t mem_stride[H5O_LAYOUT_NDIMS]; /*strides through memory*/
hsize_t hslab_size[H5O_LAYOUT_NDIMS]; /*hyperslab size */
@ -164,7 +164,7 @@ H5F_arr_read (H5F_t *f, const H5D_xfer_t *xfer,
for(i=0; i<layout->ndims; i++)
printf("%s: %d: hslab_size=%d, mem_size=%d, mem_offset=%d, file_offset=%d\n",FUNC,i,(int)_hslab_size[i],(int)mem_size[i],(int)mem_offset[i],(int)file_offset[i]);
if(qak_debug) {
printf("%s: *buf=%d, *(buf+1)=%d\n", FUNC,(int)*(const uint16 *)buf,(int)*((const uint16 *)buf+1));
printf("%s: *buf=%d, *(buf+1)=%d\n", FUNC,(int)*(const uint16_t *)buf,(int)*((const uint16 *)buf+1));
}
}
#endif /* QAK */
@ -343,7 +343,7 @@ H5F_arr_write (H5F_t *f, const H5D_xfer_t *xfer,
const hssize_t mem_offset[], const hssize_t file_offset[],
const void *_buf)
{
const uint8 *buf = (const uint8 *)_buf; /*cast for arithmetic */
const uint8_t *buf = (const uint8_t *)_buf; /*cast for arithmetic */
hssize_t file_stride[H5O_LAYOUT_NDIMS]; /*strides through file */
hssize_t mem_stride[H5O_LAYOUT_NDIMS]; /*strides through memory*/
hsize_t hslab_size[H5O_LAYOUT_NDIMS]; /*hyperslab size */
@ -391,7 +391,7 @@ H5F_arr_write (H5F_t *f, const H5D_xfer_t *xfer,
(int)mem_size[i],(int)mem_offset[i],(int)file_offset[i]);
if(qak_debug) {
printf("%s: *buf=%d, *(buf+1)=%d\n", FUNC,
(int)*(const uint16 *)buf, (int)*((const uint16 *)buf+1));
(int)*(const uint16_t *)buf, (int)*((const uint16_t *)buf+1));
}
}
#endif /* QAK */

View File

@ -34,11 +34,11 @@ static H5F_low_t *H5F_core_open(const char *name,
static herr_t H5F_core_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_core_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf);
const haddr_t *addr, size_t size, uint8_t *buf);
static herr_t H5F_core_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
const uint8 *buf);
const uint8_t *buf);
const H5F_low_class_t H5F_LOW_CORE_g[1] = {{
H5F_core_access, /*access method */
@ -185,7 +185,7 @@ H5F_core_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
static herr_t
H5F_core_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf)
const haddr_t *addr, size_t size, uint8_t *buf)
{
size_t n;
size_t eof;
@ -233,11 +233,11 @@ H5F_core_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
static herr_t
H5F_core_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
const haddr_t *addr, size_t size, const uint8 *buf)
const haddr_t *addr, size_t size, const uint8_t *buf)
{
size_t need_more, na;
size_t increment = 1;
uint8 *x = NULL;
uint8_t *x = NULL;
FUNC_ENTER(H5F_core_write, FAIL);

View File

@ -44,11 +44,11 @@ static H5F_low_t *H5F_fam_open(const char *name,
static herr_t H5F_fam_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf);
const haddr_t *addr, size_t size, uint8_t *buf);
static herr_t H5F_fam_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
const uint8 *buf);
const uint8_t *buf);
static herr_t H5F_fam_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
const H5F_low_class_t H5F_LOW_FAMILY_g[1] = {{
@ -314,7 +314,7 @@ H5F_fam_close(H5F_low_t *lf, const H5F_access_t *access_parms)
static herr_t
H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf)
const haddr_t *addr, size_t size, uint8_t *buf)
{
size_t nbytes;
haddr_t cur_addr;
@ -379,7 +379,7 @@ H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
static herr_t
H5F_fam_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, const uint8 *buf)
const haddr_t *addr, size_t size, const uint8_t *buf)
{
size_t nbytes;
haddr_t cur_addr, max_addr;
@ -497,7 +497,7 @@ static herr_t
H5F_fam_flush(H5F_low_t *lf, const H5F_access_t *access_parms)
{
int membno, nerrors = 0;
uint8 buf[1];
uint8_t buf[1];
haddr_t addr1, addr2, addr3;
hsize_t max_offset;

View File

@ -86,7 +86,7 @@ typedef struct H5F_rdcc_ent_t {
size_t wr_count; /*bytes remaining to be written */
size_t chunk_size; /*size of a chunk */
size_t alloc_size; /*amount allocated for the chunk */
uint8 *chunk; /*the unfiltered chunk data */
uint8_t *chunk; /*the unfiltered chunk data */
intn idx; /*index in hash table */
struct H5F_rdcc_ent_t *next;/*next item in doubly-linked list */
struct H5F_rdcc_ent_t *prev;/*previous item in doubly-linked list */
@ -108,9 +108,9 @@ static H5B_ins_t H5F_istore_insert(H5F_t *f, const haddr_t *addr,
void *_md_key, void *_udata,
void *_rt_key, hbool_t *rt_key_changed,
haddr_t *new_node/*out*/);
static herr_t H5F_istore_decode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
static herr_t H5F_istore_decode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
static herr_t H5F_istore_encode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
static herr_t H5F_istore_encode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
static herr_t H5F_istore_debug_key (FILE *stream, intn indent, intn fwidth,
const void *key, const void *udata);
@ -228,7 +228,7 @@ H5F_istore_sizeof_rkey(H5F_t __unused__ *f, const void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8_t *raw, void *_key)
{
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
intn i;
@ -269,7 +269,7 @@ H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
H5F_istore_encode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
H5F_istore_encode_key(H5F_t __unused__ *f, H5B_t *bt, uint8_t *raw, void *_key)
{
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
intn ndims = H5F_ISTORE_NDIMS(bt);
@ -506,7 +506,7 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op,
rt_key->nbytes = 0;
rt_key->filter_mask = 0;
for (i=0; i<udata->mesg.ndims; i++) {
assert (udata->mesg.dim[i] < MAX_HSSIZET);
assert (udata->mesg.dim[i] < HSSIZET_MAX);
assert (udata->key.offset[i]+(hssize_t)(udata->mesg.dim[i]) >
udata->key.offset[i]);
rt_key->offset[i] = udata->key.offset[i] +
@ -1434,7 +1434,7 @@ H5F_istore_unlock (H5F_t *f, const H5O_layout_t *layout,
const double split_ratios[],
const H5O_pline_t *pline, hbool_t dirty,
const hssize_t offset[], intn *idx_hint,
uint8 *chunk, size_t naccessed)
uint8_t *chunk, size_t naccessed)
{
H5F_rdcc_t *rdcc = &(f->shared->rdcc);
H5F_rdcc_ent_t *ent = NULL;
@ -1527,7 +1527,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
intn i, carry;
size_t naccessed; /*bytes accessed in chnk*/
uint8 *chunk=NULL; /*ptr to a chunk buffer */
uint8_t *chunk=NULL; /*ptr to a chunk buffer */
intn idx_hint=0; /*cache index hint */
FUNC_ENTER(H5F_istore_read, FAIL);
@ -1554,7 +1554,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0; i<layout->ndims; i++) {
assert (offset_f[i]>=0); /*negative offsets not supported*/
assert (offset_m[i]>=0); /*negative offsets not supported*/
assert (size[i]<MAX_SIZET);
assert (size[i]<SIZET_MAX);
assert(offset_m[i]+(hssize_t)size[i]<=(hssize_t)size_m[i]);
assert(layout->dim[i]>0);
}
@ -1575,7 +1575,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
while (1) {
for (i=0, naccessed=1; i<layout->ndims; i++) {
/* The location and size of the chunk being accessed */
assert (layout->dim[i] < MAX_HSSIZET);
assert (layout->dim[i] < HSSIZET_MAX);
chunk_offset[i] = idx_cur[i] * (hssize_t)(layout->dim[i]);
/* The offset and size wrt the chunk */
@ -1697,7 +1697,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
hssize_t offset_wrt_chunk[H5O_LAYOUT_NDIMS];
hssize_t sub_offset_m[H5O_LAYOUT_NDIMS];
uint8 *chunk=NULL;
uint8_t *chunk=NULL;
intn idx_hint=0;
size_t chunk_size, naccessed;
@ -1726,7 +1726,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0; i<layout->ndims; i++) {
assert (offset_f[i]>=0); /*negative offsets not supported*/
assert (offset_m[i]>=0); /*negative offsets not supported*/
assert(size[i]<MAX_SIZET);
assert(size[i]<SIZET_MAX);
assert(offset_m[i]+(hssize_t)size[i]<=(hssize_t)size_m[i]);
assert(layout->dim[i]>0);
}
@ -1749,7 +1749,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0, naccessed=1; i<layout->ndims; i++) {
/* The location and size of the chunk being accessed */
assert (layout->dim[i] < MAX_HSSIZET);
assert (layout->dim[i] < HSSIZET_MAX);
chunk_offset[i] = idx_cur[i] * (hssize_t)(layout->dim[i]);
/* The offset and size wrt the chunk */
@ -2064,7 +2064,7 @@ H5F_istore_allocate (H5F_t *f, const H5O_layout_t *layout,
intn i, carry;
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
uint8 *chunk=NULL;
uint8_t *chunk=NULL;
intn idx_hint=0;
size_t chunk_size;
#ifdef AKC

View File

@ -15,7 +15,7 @@
#include <H5Fprivate.h>
#include <H5MMprivate.h>
#define addr_defined(X) (((uint64)(-1)!=(X)->offset) ? TRUE : FALSE)
#define addr_defined(X) (((uint64_t)(-1)!=(X)->offset) ? TRUE : FALSE)
#define PABLO_MASK H5F_low
static hbool_t interface_initialize_g = FALSE;
@ -217,7 +217,7 @@ H5F_low_close(H5F_low_t *lf, const H5F_access_t *access_parms)
herr_t
H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf/*out*/)
const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
{
herr_t ret_value = FAIL;
@ -272,7 +272,7 @@ H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
herr_t
H5F_low_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, const uint8 *buf)
const haddr_t *addr, size_t size, const uint8_t *buf)
{
herr_t ret_value = FAIL;
haddr_t tmp_addr;
@ -359,7 +359,7 @@ herr_t
H5F_low_flush(H5F_low_t *lf, const H5F_access_t *access_parms)
{
haddr_t last_byte;
uint8 buf[1];
uint8_t buf[1];
FUNC_ENTER(H5F_low_flush, FAIL);
@ -689,7 +689,7 @@ H5F_addr_undef(haddr_t *addr/*out*/)
{
assert(addr);
addr->offset = (uint64)(-1);
addr->offset = (uint64_t)(-1);
}
/*-------------------------------------------------------------------------
@ -776,7 +776,7 @@ H5F_addr_zerop(const haddr_t *addr)
*-------------------------------------------------------------------------
*/
void
H5F_addr_encode(H5F_t *f, uint8 **pp, const haddr_t *addr)
H5F_addr_encode(H5F_t *f, uint8_t **pp, const haddr_t *addr)
{
uintn i;
haddr_t tmp;
@ -788,7 +788,7 @@ H5F_addr_encode(H5F_t *f, uint8 **pp, const haddr_t *addr)
if (addr_defined(addr)) {
tmp = *addr;
for (i=0; i<H5F_SIZEOF_ADDR(f); i++) {
*(*pp)++ = (uint8)(tmp.offset & 0xff);
*(*pp)++ = (uint8_t)(tmp.offset & 0xff);
tmp.offset >>= 8;
}
assert("overflow" && 0 == tmp.offset);
@ -820,11 +820,11 @@ H5F_addr_encode(H5F_t *f, uint8 **pp, const haddr_t *addr)
*-------------------------------------------------------------------------
*/
void
H5F_addr_decode(H5F_t *f, const uint8 **pp, haddr_t *addr/*out*/)
H5F_addr_decode(H5F_t *f, const uint8_t **pp, haddr_t *addr/*out*/)
{
uintn i;
haddr_t tmp;
uint8 c;
uint8_t c;
hbool_t all_zero = TRUE;
assert(f);
@ -1021,7 +1021,7 @@ H5F_addr_pack(H5F_t __unused__ *f, haddr_t *addr, const long objno[2])
assert(addr);
addr->offset=objno[0];
addr->offset|=((uint64)objno[1])<<(8*sizeof(long));
addr->offset|=((uint64_t)objno[1])<<(8*sizeof(long));
return(SUCCEED);
}

View File

@ -108,12 +108,12 @@ static herr_t H5F_mpio_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_mpio_read(H5F_low_t *lf, H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
uint8 *buf/*out*/);
uint8_t *buf/*out*/);
htri_t H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval );
static herr_t H5F_mpio_write(H5F_low_t *lf, H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
const uint8 *buf);
const uint8_t *buf);
static herr_t H5F_mpio_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_MPIOff_to_haddr(MPI_Offset mpi_off, haddr_t *addr);
static herr_t H5F_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off);
@ -127,14 +127,14 @@ const H5F_low_class_t H5F_LOW_MPIO_g[1] = {{
* this is ugly, but removing the const modifier from access_parms
* in the parameter list of the write function in H5F_low_class_t
* would propagate to a lot of functions that don't change that param */
(int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, uint8 *buf))
(int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, uint8_t *buf))
H5F_mpio_read, /*read method */
/* rky 980816
* this is ugly, but removing the const modifier from access_parms
* in the parameter list of the write function in H5F_low_class_t
* would propagate to a lot of functions that don't change that param */
(int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, const uint8 *buf))
(int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, const uint8_t *buf))
H5F_mpio_write, /*write method */
H5F_mpio_flush, /*flush method */
@ -492,7 +492,7 @@ H5F_mpio_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
static herr_t
H5F_mpio_read(H5F_low_t *lf, H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf/*out*/)
const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
{
MPI_Offset mpi_off, mpi_disp;
MPI_Status mpi_stat;
@ -739,7 +739,7 @@ H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval )
static herr_t
H5F_mpio_write(H5F_low_t *lf, H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, const uint8 *buf)
const haddr_t *addr, size_t size, const uint8_t *buf)
{
MPI_Offset mpi_off, mpi_disp;
MPI_Status mpi_stat;
@ -957,7 +957,7 @@ H5F_MPIOff_to_haddr( MPI_Offset mpi_off, haddr_t *addr )
{
herr_t ret_val = FAIL;
addr->offset = (uint64) mpi_off;
addr->offset = (uint64_t) mpi_off;
if (addr->offset == mpi_off)
ret_val = SUCCEED;

View File

@ -68,77 +68,77 @@
/* For non-little-endian platforms, encode each byte by itself */
#ifdef WORDS_BIGENDIAN
# define INT16ENCODE(p, i) { \
*(p) = (uint8)( (uintn)(i) & 0xff); (p)++; \
*(p) = (uint8)(((uintn)(i) >> 8) & 0xff); (p)++; \
*(p) = (uint8_t)( (uintn)(i) & 0xff); (p)++; \
*(p) = (uint8_t)(((uintn)(i) >> 8) & 0xff); (p)++; \
}
# define UINT16ENCODE(p, i) { \
*(p) = (uint8)( (i) & 0xff); (p)++; \
*(p) = (uint8)(((uintn)(i) >> 8) & 0xff); (p)++; \
*(p) = (uint8_t)( (i) & 0xff); (p)++; \
*(p) = (uint8_t)(((uintn)(i) >> 8) & 0xff); (p)++; \
}
# define INT32ENCODE(p, i) { \
*(p) = (uint8)( (uint32)(i) & 0xff); (p)++; \
*(p) = (uint8)(((uint32)(i) >> 8) & 0xff); (p)++; \
*(p) = (uint8)(((uint32)(i) >> 16) & 0xff); (p)++; \
*(p) = (uint8)(((uint32)(i) >> 24) & 0xff); (p)++; \
*(p) = (uint8_t)( (uint32_t)(i) & 0xff); (p)++; \
*(p) = (uint8_t)(((uint32_t)(i) >> 8) & 0xff); (p)++; \
*(p) = (uint8_t)(((uint32_t)(i) >> 16) & 0xff); (p)++; \
*(p) = (uint8_t)(((uint32_t)(i) >> 24) & 0xff); (p)++; \
}
# define UINT32ENCODE(p, i) { \
*(p) = (uint8)( (i) & 0xff); (p)++; \
*(p) = (uint8)(((i) >> 8) & 0xff); (p)++; \
*(p) = (uint8)(((i) >> 16) & 0xff); (p)++; \
*(p) = (uint8)(((i) >> 24) & 0xff); (p)++; \
*(p) = (uint8_t)( (i) & 0xff); (p)++; \
*(p) = (uint8_t)(((i) >> 8) & 0xff); (p)++; \
*(p) = (uint8_t)(((i) >> 16) & 0xff); (p)++; \
*(p) = (uint8_t)(((i) >> 24) & 0xff); (p)++; \
}
# define INT64ENCODE(p, n) { \
int64 _n = (n); \
int64_t _n = (n); \
size_t _i; \
uint8 *_p = (uint8*)(p); \
for (_i=0; _i<sizeof(int64); _i++, _n>>=8) { \
*_p++ = (uint8)(_n & 0xff); \
uint8_t *_p = (uint8_t*)(p); \
for (_i=0; _i<sizeof(int64_t); _i++, _n>>=8) { \
*_p++ = (uint8_t)(_n & 0xff); \
} \
for (/*void*/; _i<8; _i++) { \
*_p++ = (n)<0 ? 0xff : 0; \
} \
(p) = (uint8*)(p)+8; \
(p) = (uint8_t*)(p)+8; \
}
# define UINT64ENCODE(p, n) { \
uint64 _n = (n); \
uint64_t _n = (n); \
size_t _i; \
uint8 *_p = (uint8*)(p); \
for (_i=0; _i<sizeof(uint64); _i++, _n>>=8) { \
*_p++ = (uint8)(_n & 0xff); \
uint8_t *_p = (uint8_t*)(p); \
for (_i=0; _i<sizeof(uint64_t); _i++, _n>>=8) { \
*_p++ = (uint8_t)(_n & 0xff); \
} \
for (/*void*/; _i<8; _i++) { \
*_p++ = 0; \
} \
(p) = (uint8*)(p)+8; \
(p) = (uint8_t*)(p)+8; \
}
# define INT16DECODE(p, i) { \
(i) = (int16)((*(p) & 0xff)); (p)++; \
(i) |= (int16)((*(p) & 0xff) << 8); (p)++; \
(i) = (int16_t)((*(p) & 0xff)); (p)++; \
(i) |= (int16_t)((*(p) & 0xff) << 8); (p)++; \
}
# define UINT16DECODE(p, i) { \
(i) = (uint16) (*(p) & 0xff); (p)++; \
(i) |= (uint16)((*(p) & 0xff) << 8); (p)++; \
(i) = (uint16_t) (*(p) & 0xff); (p)++; \
(i) |= (uint16_t)((*(p) & 0xff) << 8); (p)++; \
}
# define INT32DECODE(p, i) { \
(i) = ( *(p) & 0xff); (p)++; \
(i) |= ((int32)(*(p) & 0xff) << 8); (p)++; \
(i) |= ((int32)(*(p) & 0xff) << 16); (p)++; \
(i) |= ((int32)(*(p) & 0xff) << 24); (p)++; \
(i) = ( *(p) & 0xff); (p)++; \
(i) |= ((int32_t)(*(p) & 0xff) << 8); (p)++; \
(i) |= ((int32_t)(*(p) & 0xff) << 16); (p)++; \
(i) |= ((int32_t)(*(p) & 0xff) << 24); (p)++; \
}
# define UINT32DECODE(p, i) { \
(i) = (uint32)(*(p) & 0xff); (p)++; \
(i) |= ((uint32)(*(p) & 0xff) << 8); (p)++; \
(i) |= ((uint32)(*(p) & 0xff) << 16); (p)++; \
(i) |= ((uint32)(*(p) & 0xff) << 24); (p)++; \
(i) = (uint32_t)(*(p) & 0xff); (p)++; \
(i) |= ((uint32_t)(*(p) & 0xff) << 8); (p)++; \
(i) |= ((uint32_t)(*(p) & 0xff) << 16); (p)++; \
(i) |= ((uint32_t)(*(p) & 0xff) << 24); (p)++; \
}
# define INT64DECODE(p, n) { \
@ -146,7 +146,7 @@
size_t _i; \
n = 0; \
(p) += 8; \
for (_i=0; _i<sizeof(int64); _i++) { \
for (_i=0; _i<sizeof(int64_t); _i++) { \
n = (n<<8) | *(--p); \
} \
(p) += 8; \
@ -157,7 +157,7 @@
size_t _i; \
n = 0; \
(p) += 8; \
for (_i=0; _i<sizeof(uint64); _i++) { \
for (_i=0; _i<sizeof(uint64_t); _i++) { \
n = (n<<8) | *(--p); \
} \
(p) += 8; \
@ -165,15 +165,15 @@
#else
/* For little-endian platforms, make the compiler do the work */
# define INT16ENCODE(p, i) { *((int16 *)(p)) = (int16)(i); (p)+=2; }
# define UINT16ENCODE(p, i) { *((uint16 *)(p)) = (uint16)(i); (p)+=2; }
# define INT32ENCODE(p, i) { *((int32 *)(p)) = (int32)(i); (p)+=4; }
# define UINT32ENCODE(p, i) { *((uint32 *)(p)) = (uint32)(i); (p)+=4; }
# define INT16ENCODE(p, i) {*((int16_t*)(p))=(int16_t)(i);(p)+=2;}
# define UINT16ENCODE(p, i) {*((uint16_t*)(p))=(uint16_t)(i);(p)+=2;}
# define INT32ENCODE(p, i) {*((int32_t*)(p))=(int32_t)(i);(p)+=4;}
# define UINT32ENCODE(p, i) {*((uint32_t*)(p))=(uint32_t)(i);(p)+=4;}
# define INT64ENCODE(p, i) { \
*((int64 *)(p)) = (int64)(i); \
(p) += sizeof(int64); \
if (4==sizeof(int64)) { \
*((int64_t *)(p)) = (int64_t)(i); \
(p) += sizeof(int64_t); \
if (4==sizeof(int64_t)) { \
*(p)++ = (i)<0?0xff:0x00; \
*(p)++ = (i)<0?0xff:0x00; \
*(p)++ = (i)<0?0xff:0x00; \
@ -182,9 +182,9 @@
}
# define UINT64ENCODE(p, i) { \
*((uint64 *)(p)) = (uint64)(i); \
(p) += sizeof(uint64); \
if (4==sizeof(uint64)) { \
*((uint64_t *)(p)) = (uint64_t)(i); \
(p) += sizeof(uint64_t); \
if (4==sizeof(uint64_t)) { \
*(p)++ = 0x00; \
*(p)++ = 0x00; \
*(p)++ = 0x00; \
@ -192,12 +192,12 @@
} \
}
# define INT16DECODE(p, i) { (i) = (int16)(*(const int16 *)(p)); (p)+=2; }
# define UINT16DECODE(p, i) { (i) = (uint16)(*(const uint16 *)(p)); (p)+=2; }
# define INT32DECODE(p, i) { (i) = (int32)(*(const int32 *)(p)); (p)+=4; }
# define UINT32DECODE(p, i) { (i) = (uint32)(*(const uint32 *)(p)); (p)+=4; }
# define INT64DECODE(p, i) { (i) = (int64)(*(const int64 *)(p)); (p)+=8; }
# define UINT64DECODE(p, i) { (i) = (uint64)(*(const uint64 *)(p)); (p)+=8; }
# define INT16DECODE(p, i) {(i)=(int16_t)(*(const int16_t*)(p));(p)+=2;}
# define UINT16DECODE(p, i) {(i)=(uint16_t)(*(const uint16_t*)(p));(p)+=2;}
# define INT32DECODE(p, i) {(i)=(int32_t)(*(const int32_t*)(p));(p)+=4;}
# define UINT32DECODE(p, i) {(i)=(uint32_t)(*(const uint32_t*)(p));(p)+=4;}
# define INT64DECODE(p, i) {(i)=(int64_t)(*(const int64_t*)(p));(p)+=8;}
# define UINT64DECODE(p, i) {(i)=(uint64_t)(*(const uint64_t*)(p));(p)+=8;}
#endif
@ -321,10 +321,10 @@ typedef struct H5F_low_class_t {
const H5F_access_t *access_parms);
herr_t (*read)(struct H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf);
const haddr_t *addr, size_t size, uint8_t *buf);
herr_t (*write)(struct H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, const uint8 *buf);
const haddr_t *addr, size_t size, const uint8_t *buf);
herr_t (*flush)(struct H5F_low_t *lf,
const H5F_access_t *access_parms);
herr_t (*extend)(struct H5F_low_t *lf,
@ -353,7 +353,7 @@ typedef struct H5F_low_t {
/* Split meta/raw data */
struct {
char *name; /* Base name w/o extension */
uint64 mask; /* Bit that determines which file to use*/
uint64_t mask; /* Bit that determines which file to use*/
struct H5F_low_t *meta; /* Meta data file */
struct H5F_low_t *raw; /* Raw data file */
} split;
@ -374,7 +374,7 @@ typedef struct H5F_low_t {
FILE *f; /* Posix stdio file */
H5F_fileop_t op; /* Previous file operation */
#ifdef HAVE_FSEEK64
int64 cur; /* Current file position */
int64_t cur; /* Current file position */
#else
long cur; /* Current file position */
#endif
@ -382,7 +382,7 @@ typedef struct H5F_low_t {
/* In-core temp file */
struct {
uint8 *mem; /* Mem image of the file */
uint8_t *mem; /* Mem image of the file */
size_t size; /* Current file size */
size_t alloc; /* Current size of MEM buffer */
} core;
@ -454,7 +454,7 @@ typedef struct H5F_file_t {
uintn flags; /* Access Permissions for file */
H5F_low_t *lf; /* Lower level file handle for I/O */
uintn nrefs; /* Ref count for times file is opened */
uint32 consist_flags; /* File Consistency Flags */
uint32_t consist_flags; /* File Consistency Flags */
haddr_t boot_addr; /* Absolute address of boot block */
haddr_t base_addr; /* Absolute base address for rel.addrs. */
haddr_t freespace_addr; /* Relative address of free-space info */
@ -489,7 +489,7 @@ typedef struct H5F_t {
#define H5F_ENCODE_OFFSET(f,p,o) (H5F_SIZEOF_ADDR(f)==4 ? UINT32ENCODE(p,o) \
: H5F_SIZEOF_ADDR(f)==8 ? UINT64ENCODE(p,o) \
: H5F_SIZEOF_ADDR(f)==2 ? UINT16ENCODE(p,o) \
: H5FPencode_unusual_offset(f,&(p),(uint8 *)&(o)))
: H5FPencode_unusual_offset(f,&(p),(uint8_t*)&(o)))
#else /* NOT_YET */
#define H5F_ENCODE_OFFSET(f,p,o) switch(H5F_SIZEOF_ADDR(f)) { \
case 4: UINT32ENCODE(p,o); break; \
@ -544,7 +544,7 @@ extern hbool_t H5_mpi_1_metawrite_g;
/* Private functions, not part of the publicly documented API */
herr_t H5F_init_interface(void);
void H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l);
void H5F_encode_length_unusual(const H5F_t *f, uint8_t **p, uint8_t *l);
H5F_t *H5F_open(const char *name, uintn flags,
const H5F_create_t *create_parms,
const H5F_access_t *access_parms);
@ -621,10 +621,10 @@ H5F_low_t *H5F_low_close(H5F_low_t *lf, const H5F_access_t *access_parms);
hsize_t H5F_low_size(H5F_low_t *lf, haddr_t *addr);
herr_t H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf);
const haddr_t *addr, size_t size, uint8_t *buf);
herr_t H5F_low_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, const uint8 *buf);
const haddr_t *addr, size_t size, const uint8_t *buf);
herr_t H5F_low_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
/* Functions that operate on addresses */
@ -640,8 +640,8 @@ htri_t H5F_addr_defined(const haddr_t *);
void H5F_addr_undef(haddr_t *);
void H5F_addr_reset(haddr_t *);
htri_t H5F_addr_zerop(const haddr_t *);
void H5F_addr_encode(H5F_t *, uint8 **, const haddr_t *);
void H5F_addr_decode(H5F_t *, const uint8 **, haddr_t *);
void H5F_addr_encode(H5F_t *, uint8_t **, const haddr_t *);
void H5F_addr_decode(H5F_t *, const uint8_t **, haddr_t *);
void H5F_addr_print(FILE *, const haddr_t *);
void H5F_addr_pow2(uintn, haddr_t *);
void H5F_addr_inc(haddr_t *addr/*in,out*/, hsize_t inc);

View File

@ -30,11 +30,11 @@ static herr_t H5F_sec2_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_sec2_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
uint8 *buf/*out*/);
uint8_t *buf/*out*/);
static herr_t H5F_sec2_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
const uint8 *buf);
const uint8_t *buf);
const H5F_low_class_t H5F_LOW_SEC2_g[1] = {{
NULL, /* access method */
@ -159,10 +159,10 @@ H5F_sec2_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
static herr_t
H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf)
const haddr_t *addr, size_t size, uint8_t *buf)
{
ssize_t n;
uint64 mask;
uint64_t mask;
#ifdef HAVE_LSEEK64
off64_t offset;
#else
@ -172,7 +172,7 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
FUNC_ENTER(H5F_sec2_read, FAIL);
/* Check for overflow */
mask = (uint64)1 << (8*sizeof(offset)-1);
mask = (uint64_t)1 << (8*sizeof(offset)-1);
if (addr->offset >= mask ||
addr->offset+size < addr->offset ||
addr->offset+size >= mask) {
@ -186,7 +186,7 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
/* Check easy cases */
if (0 == size) HRETURN(SUCCEED);
if ((uint64)offset >= lf->eof.offset) {
if ((uint64_t)offset >= lf->eof.offset) {
HDmemset(buf, 0, size);
HRETURN(SUCCEED);
}
@ -264,9 +264,9 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
static herr_t
H5F_sec2_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
const haddr_t *addr, size_t size, const uint8 *buf)
const haddr_t *addr, size_t size, const uint8_t *buf)
{
uint64 mask;
uint64_t mask;
ssize_t n;
#ifdef HAVE_LSEEK64
off64_t offset;
@ -277,7 +277,7 @@ H5F_sec2_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
FUNC_ENTER(H5F_sec2_write, FAIL);
/* Check for overflow */
mask = (uint64)1 << (8*sizeof(offset)-1);
mask = (uint64_t)1 << (8*sizeof(offset)-1);
if (addr->offset >= mask ||
addr->offset+size < addr->offset ||
addr->offset+size >= mask) {

View File

@ -35,11 +35,11 @@ static herr_t H5F_split_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
uint8 *buf/*out*/);
uint8_t *buf/*out*/);
static herr_t H5F_split_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
const uint8 *buf);
const uint8_t *buf);
static herr_t H5F_split_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_split_extend(H5F_low_t *lf, const H5F_access_t *access_parms,
intn op, hsize_t size, haddr_t *addr/*out*/);
@ -213,7 +213,7 @@ H5F_split_close(H5F_low_t *lf, const H5F_access_t *access_parms)
static herr_t
H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf/*out*/)
const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
{
haddr_t tmp_addr;
H5F_low_t *sub = NULL;
@ -263,7 +263,7 @@ H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
static herr_t
H5F_split_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size, const uint8 *buf)
const haddr_t *addr, size_t size, const uint8_t *buf)
{
haddr_t tmp_addr;
H5F_low_t *sub = NULL;

View File

@ -24,11 +24,11 @@ static herr_t H5F_stdio_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_stdio_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
uint8 *buf/*out*/);
uint8_t *buf/*out*/);
static herr_t H5F_stdio_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
const uint8 *buf);
const uint8_t *buf);
static herr_t H5F_stdio_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
const H5F_low_class_t H5F_LOW_STDIO_g[1] = {{
@ -184,12 +184,12 @@ H5F_stdio_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
static herr_t
H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
const haddr_t *addr, size_t size, uint8 *buf/*out*/)
const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
{
size_t n;
uint64 mask;
uint64_t mask;
#ifdef HAVE_FSEEK64
int64 offset;
int64_t offset;
#else
long offset;
#endif
@ -197,21 +197,21 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
FUNC_ENTER(H5F_stdio_read, FAIL);
/* Check for overflow */
mask = (uint64)1 << (8*sizeof(offset)-1);
mask = (uint64_t)1 << (8*sizeof(offset)-1);
if (addr->offset >= mask ||
addr->offset + size < addr->offset ||
addr->offset+size >= mask) {
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
}
#ifdef HAVE_FSEEK64
offset = (int64)(addr->offset); /*checked for overflow*/
offset = (int64_t)(addr->offset); /*checked for overflow*/
#else
offset = (long)(addr->offset); /*checked for overflow*/
#endif
/* Check easy cases */
if (0 == size) HRETURN(SUCCEED);
if ((uint64)offset >= lf->eof.offset) {
if ((uint64_t)offset >= lf->eof.offset) {
HDmemset(buf, 0, size);
HRETURN(SUCCEED);
}
@ -261,7 +261,7 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
*/
lf->u.stdio.op = H5F_OP_READ;
#ifdef HAVE_FSEEK64
lf->u.stdio.cur = (int64)(offset+n); /*checked for overflow above*/
lf->u.stdio.cur = (int64_t)(offset+n); /*checked for overflow above*/
#else
lf->u.stdio.cur = (off_t)(offset+n); /*checked for overflow above*/
#endif
@ -293,12 +293,12 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
static herr_t
H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
const haddr_t *addr, size_t size, const uint8 *buf)
const haddr_t *addr, size_t size, const uint8_t *buf)
{
uint64 mask;
uint64_t mask;
#ifdef HAVE_FSEEK64
int64 offset;
uint64 n;
int64_t offset;
uint64_t n;
#else
long offset;
size_t n;
@ -307,14 +307,14 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
FUNC_ENTER(H5F_stdio_write, FAIL);
/* Check for overflow */
mask = (uint64)1 << (8*sizeof(offset)-1);
mask = (uint64_t)1 << (8*sizeof(offset)-1);
if (addr->offset >= mask ||
addr->offset+size < addr->offset ||
addr->offset+size >= mask) {
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
}
#ifdef HAVE_FSEEK64
offset = (int64)(addr->offset); /*checked for overflow*/
offset = (int64_t)(addr->offset); /*checked for overflow*/
n = size; /*checked for overflow*/
#else
offset = (long)(addr->offset); /*checked for overflow*/
@ -353,7 +353,7 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
* Update seek optimizing data.
*/
lf->u.stdio.op = H5F_OP_WRITE;
lf->u.stdio.cur = offset + (int64)n;
lf->u.stdio.cur = offset + (int64_t)n;
FUNC_LEAVE(SUCCEED);
}

View File

@ -731,6 +731,7 @@ H5G_term_interface(void)
/* Destroy the group object id group */
H5I_destroy_group(H5I_GROUP);
interface_initialize_g = FALSE;
}

View File

@ -101,7 +101,7 @@ H5G_ent_modified(H5G_entry_t *ent, H5G_type_t cache_type)
*-------------------------------------------------------------------------
*/
herr_t
H5G_ent_decode_vec(H5F_t *f, const uint8 **pp, H5G_entry_t *ent, intn n)
H5G_ent_decode_vec(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, intn n)
{
intn i;
@ -146,10 +146,10 @@ H5G_ent_decode_vec(H5F_t *f, const uint8 **pp, H5G_entry_t *ent, intn n)
*-------------------------------------------------------------------------
*/
herr_t
H5G_ent_decode(H5F_t *f, const uint8 **pp, H5G_entry_t *ent)
H5G_ent_decode(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
{
const uint8 *p_ret = *pp;
uint32 tmp;
const uint8_t *p_ret = *pp;
uint32_t tmp;
FUNC_ENTER(H5G_ent_decode, FAIL);
@ -213,7 +213,7 @@ H5G_ent_decode(H5F_t *f, const uint8 **pp, H5G_entry_t *ent)
*-------------------------------------------------------------------------
*/
herr_t
H5G_ent_encode_vec(H5F_t *f, uint8 **pp, const H5G_entry_t *ent, intn n)
H5G_ent_encode_vec(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, intn n)
{
intn i;
@ -261,9 +261,9 @@ H5G_ent_encode_vec(H5F_t *f, uint8 **pp, const H5G_entry_t *ent, intn n)
*-------------------------------------------------------------------------
*/
herr_t
H5G_ent_encode(H5F_t *f, uint8 **pp, const H5G_entry_t *ent)
H5G_ent_encode(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
{
uint8 *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
uint8_t *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
FUNC_ENTER(H5G_ent_encode, FAIL);

View File

@ -34,9 +34,9 @@
#define PABLO_MASK H5G_node_mask
/* PRIVATE PROTOTYPES */
static herr_t H5G_node_decode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
static herr_t H5G_node_decode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
static herr_t H5G_node_encode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
static herr_t H5G_node_encode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
static size_t H5G_node_size(H5F_t *f);
static herr_t H5G_node_create(H5F_t *f, H5B_ins_t op, void *_lt_key,
@ -136,7 +136,7 @@ H5G_node_sizeof_rkey(H5F_t *f, const void __unused__ *udata)
*-------------------------------------------------------------------------
*/
static herr_t
H5G_node_decode_key(H5F_t *f, H5B_t __unused__ *bt, uint8 *raw, void *_key)
H5G_node_decode_key(H5F_t *f, H5B_t __unused__ *bt, uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
@ -168,7 +168,7 @@ H5G_node_decode_key(H5F_t *f, H5B_t __unused__ *bt, uint8 *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
H5G_node_encode_key(H5F_t *f, H5B_t __unused__ *bt, uint8 *raw, void *_key)
H5G_node_encode_key(H5F_t *f, H5B_t __unused__ *bt, uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
@ -303,7 +303,7 @@ static herr_t
H5G_node_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr,
H5G_node_t *sym)
{
uint8 *buf = NULL, *p = NULL;
uint8_t *buf = NULL, *p = NULL;
size_t size;
herr_t status;
int i;
@ -395,8 +395,8 @@ H5G_node_load(H5F_t *f, const haddr_t *addr, const void __unused__ *_udata1,
{
H5G_node_t *sym = NULL;
size_t size = 0;
uint8 *buf = NULL;
const uint8 *p = NULL;
uint8_t *buf = NULL;
const uint8_t *p = NULL;
H5G_node_t *ret_value = NULL; /*for error handling */
FUNC_ENTER(H5G_node_load, NULL);

View File

@ -130,8 +130,8 @@ herr_t H5G_stab_remove(H5G_entry_t *grp_ent, const char *name);
/*
* Functions that understand symbol table entries.
*/
herr_t H5G_ent_decode_vec (H5F_t *f, const uint8 **pp, H5G_entry_t *ent,
herr_t H5G_ent_decode_vec (H5F_t *f, const uint8_t **pp, H5G_entry_t *ent,
intn n);
herr_t H5G_ent_encode_vec (H5F_t *f, uint8 **pp, const H5G_entry_t *ent,
herr_t H5G_ent_encode_vec (H5F_t *f, uint8_t **pp, const H5G_entry_t *ent,
intn n);
#endif

View File

@ -141,8 +141,8 @@ H5F_t *H5G_insertion_file(H5G_entry_t *loc, const char *name);
herr_t H5G_traverse_slink (H5G_entry_t *grp_ent/*in,out*/,
H5G_entry_t *obj_ent/*in,out*/,
intn *nlinks/*in,out*/);
herr_t H5G_ent_encode (H5F_t *f, uint8 **pp, const H5G_entry_t *ent);
herr_t H5G_ent_decode (H5F_t *f, const uint8 **pp, H5G_entry_t *ent/*out*/);
herr_t H5G_ent_encode (H5F_t *f, uint8_t **pp, const H5G_entry_t *ent);
herr_t H5G_ent_decode (H5F_t *f, const uint8_t **pp, H5G_entry_t *ent/*out*/);
/*
* These functions operate on symbol table nodes.

View File

@ -36,14 +36,14 @@
typedef struct H5HG_obj_t {
intn nrefs; /*reference count */
size_t size; /*total size of object */
uint8 *begin; /*ptr to object into heap->chunk*/
uint8_t *begin; /*ptr to object into heap->chunk*/
} H5HG_obj_t;
struct H5HG_heap_t {
haddr_t addr; /*collection address */
hbool_t dirty; /*does heap need to be saved? */
size_t size; /*total size of collection */
uint8 *chunk; /*the collection, incl. header */
uint8_t *chunk; /*the collection, incl. header */
intn nalloc; /*numb object slots allocated */
H5HG_obj_t *obj; /*array of object descriptions */
};
@ -94,7 +94,7 @@ H5HG_create (H5F_t *f, size_t size)
{
H5HG_heap_t *heap = NULL;
H5HG_heap_t *ret_value = NULL;
uint8 *p = NULL;
uint8_t *p = NULL;
haddr_t addr;
FUNC_ENTER (H5HG_create, NULL);
@ -200,7 +200,7 @@ H5HG_load (H5F_t *f, const haddr_t *addr, const void __unused__ *udata1,
{
H5HG_heap_t *heap = NULL;
H5HG_heap_t *ret_value = NULL;
uint8 *p = NULL;
uint8_t *p = NULL;
intn i;
size_t nalloc;
@ -286,7 +286,7 @@ H5HG_load (H5F_t *f, const haddr_t *addr, const void __unused__ *udata1,
p += heap->obj[0].size;
} else {
intn idx;
uint8 *begin = p;
uint8_t *begin = p;
UINT16DECODE (p, idx);
assert (idx<heap->nalloc);
assert (NULL==heap->obj[idx].begin);
@ -422,7 +422,7 @@ static intn
H5HG_alloc (H5F_t *f, H5HG_heap_t *heap, int cwfsno, size_t size)
{
int idx;
uint8 *p = NULL;
uint8_t *p = NULL;
size_t need = H5HG_ALIGN(H5HG_SIZEOF_OBJHDR(f) + size);
FUNC_ENTER (H5HG_alloc, FAIL);
@ -671,7 +671,7 @@ H5HG_read (H5F_t *f, H5HG_t *hobj, void *object/*out*/)
H5HG_heap_t *heap = NULL;
intn i;
size_t size;
uint8 *p = NULL;
uint8_t *p = NULL;
FUNC_ENTER (H5HG_read, NULL);
@ -786,7 +786,7 @@ H5HG_link (H5F_t *f, H5HG_t *hobj, intn adjust)
herr_t
H5HG_remove (H5F_t *f, H5HG_t *hobj)
{
uint8 *p=NULL, *obj_start=NULL;
uint8_t *p=NULL, *obj_start=NULL;
H5HG_heap_t *heap = NULL;
size_t need;
intn i;
@ -893,7 +893,7 @@ H5HG_debug(H5F_t *f, const haddr_t *addr, FILE *stream, intn indent,
H5HG_heap_t *h = NULL;
char buf[64];
size_t size;
uint8 *p = NULL;
uint8_t *p = NULL;
FUNC_ENTER(H5HG_debug, FAIL);

View File

@ -41,7 +41,7 @@ typedef struct H5HL_t {
haddr_t addr; /*address of data */
size_t disk_alloc; /*data bytes allocated on disk */
size_t mem_alloc; /*data bytes allocated in mem */
uint8 *chunk; /*the chunk, including header */
uint8_t *chunk; /*the chunk, including header */
H5HL_free_t *freelist; /*the free list */
} H5HL_t;
@ -188,8 +188,8 @@ static H5HL_t *
H5HL_load(H5F_t *f, const haddr_t *addr, const void __unused__ *udata1,
void __unused__ *udata2)
{
uint8 hdr[52];
const uint8 *p = NULL;
uint8_t hdr[52];
const uint8_t *p = NULL;
H5HL_t *heap = NULL;
H5HL_free_t *fl = NULL, *tail = NULL;
size_t free_block = H5HL_FREE_NULL;
@ -311,7 +311,7 @@ H5HL_load(H5F_t *f, const haddr_t *addr, const void __unused__ *udata1,
static herr_t
H5HL_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5HL_t *heap)
{
uint8 *p = heap->chunk;
uint8_t *p = heap->chunk;
H5HL_free_t *fl = heap->freelist;
haddr_t hdr_end_addr;
@ -918,9 +918,9 @@ H5HL_debug(H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
{
H5HL_t *h = NULL;
int i, j, overlap;
uint8 c;
uint8_t c;
H5HL_free_t *freelist = NULL;
uint8 *marker = NULL;
uint8_t *marker = NULL;
size_t amount_free = 0;
FUNC_ENTER(H5HL_debug, FAIL);

View File

@ -941,4 +941,7 @@ H5I_term_interface(void)
id_group_list[i] = NULL;
}
}
/* Indicate interface closed */
interface_initialize_g = FALSE;
}

View File

@ -318,14 +318,14 @@ H5O_load(H5F_t *f, const haddr_t *addr, const void __unused__ *_udata1,
{
H5O_t *oh = NULL;
H5O_t *ret_value = NULL;
uint8 buf[16], *p;
uint8_t buf[16], *p;
size_t hdr_size, mesg_size;
uintn id;
intn mesgno, chunkno, curmesg = 0, nmesgs;
haddr_t chunk_addr;
size_t chunk_size;
H5O_cont_t *cont = NULL;
uint8 flags;
uint8_t flags;
FUNC_ENTER(H5O_load, NULL);
@ -454,7 +454,7 @@ H5O_load(H5F_t *f, const haddr_t *addr, const void __unused__ *_udata1,
!H5F_addr_defined(&chunk_addr) && curmesg < oh->nmesgs;
curmesg++) {
if (H5O_CONT_ID == oh->mesg[curmesg].type->id) {
uint8 *p2 = oh->mesg[curmesg].raw;
uint8_t *p2 = oh->mesg[curmesg].raw;
cont = (H5O_CONT->decode) (f, p2, NULL);
oh->mesg[curmesg].native = cont;
chunk_addr = cont->addr;
@ -505,10 +505,10 @@ H5O_load(H5F_t *f, const haddr_t *addr, const void __unused__ *_udata1,
static herr_t
H5O_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5O_t *oh)
{
uint8 buf[16], *p;
uint8_t buf[16], *p;
intn i, id;
H5O_cont_t *cont = NULL;
herr_t (*encode)(H5F_t*, uint8*, const void*) = NULL;
herr_t (*encode)(H5F_t*, uint8_t*, const void*) = NULL;
FUNC_ENTER(H5O_flush, FAIL);
@ -1573,7 +1573,7 @@ H5O_alloc_extend_chunk(H5O_t *oh, intn chunkno, size_t size)
{
intn idx, i;
size_t delta;
uint8 *old_addr;
uint8_t *old_addr;
FUNC_ENTER(H5O_alloc_extend_chunk, FAIL);
@ -1702,7 +1702,7 @@ H5O_alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size)
intn found_null = (-1); /*best fit null message */
intn found_other = (-1); /*best fit other message */
intn idx = FAIL; /*message number return value */
uint8 *p = NULL; /*ptr into new chunk */
uint8_t *p = NULL; /*ptr into new chunk */
H5O_cont_t *cont = NULL; /*native continuation message */
intn i, chunkno;
@ -2059,7 +2059,7 @@ H5O_debug(H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
int *sequence;
haddr_t tmp_addr;
herr_t ret_value = FAIL;
void *(*decode)(H5F_t*, const uint8*, H5O_shared_t*);
void *(*decode)(H5F_t*, const uint8_t*, H5O_shared_t*);
herr_t (*debug)(H5F_t*, const void*, FILE*, intn, intn)=NULL;
FUNC_ENTER(H5O_debug, FAIL);

View File

@ -28,8 +28,8 @@ static char RcsId[] = "@(#)$Revision$";
#define PABLO_MASK H5O_attr_mask
/* PRIVATE PROTOTYPES */
static herr_t H5O_attr_encode (H5F_t *f, uint8 *p, const void *mesg);
static void *H5O_attr_decode (H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_attr_encode (H5F_t *f, uint8_t *p, const void *mesg);
static void *H5O_attr_decode (H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static void *H5O_attr_copy (const void *_mesg, void *_dest);
static size_t H5O_attr_size (H5F_t *f, const void *_mesg);
static herr_t H5O_attr_reset (void *_mesg);
@ -67,7 +67,7 @@ static hbool_t interface_initialize_g = FALSE;
void *H5O_attr_decode(f, raw_size, p)
H5F_t *f; IN: pointer to the HDF5 file struct
size_t raw_size; IN: size of the raw information buffer
const uint8 *p; IN: the raw information buffer
const uint8_t *p; IN: the raw information buffer
RETURNS
Pointer to the new message in native order on success, NULL on failure
DESCRIPTION
@ -83,7 +83,7 @@ static hbool_t interface_initialize_g = FALSE;
* Added a version number at the beginning.
--------------------------------------------------------------------------*/
static void *
H5O_attr_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
H5O_attr_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5A_t *attr = NULL;
H5S_simple_t *simple; /*simple dimensionality information */
@ -195,7 +195,7 @@ H5O_attr_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
* Added a version number at the beginning.
--------------------------------------------------------------------------*/
static herr_t
H5O_attr_encode(H5F_t *f, uint8 *p, const void *mesg)
H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
{
const H5A_t *attr = (const H5A_t *) mesg;
size_t name_len; /* Attribute name length */

View File

@ -19,8 +19,8 @@ static hbool_t interface_initialize_g = FALSE;
#define H5O_PLINE_VERSION 1
static herr_t H5O_pline_encode (H5F_t *f, uint8 *p, const void *mesg);
static void *H5O_pline_decode (H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_pline_encode (H5F_t *f, uint8_t *p, const void *mesg);
static void *H5O_pline_decode (H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static void *H5O_pline_copy (const void *_mesg, void *_dest);
static size_t H5O_pline_size (H5F_t *f, const void *_mesg);
static herr_t H5O_pline_reset (void *_mesg);
@ -61,7 +61,7 @@ const H5O_class_t H5O_PLINE[1] = {{
*-------------------------------------------------------------------------
*/
static void *
H5O_pline_decode(H5F_t __unused__ *f, const uint8 *p,
H5O_pline_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
H5O_pline_t *pline = NULL;
@ -165,7 +165,7 @@ H5O_pline_decode(H5F_t __unused__ *f, const uint8 *p,
*-------------------------------------------------------------------------
*/
static herr_t
H5O_pline_encode (H5F_t __unused__ *f, uint8 *p/*out*/, const void *mesg)
H5O_pline_encode (H5F_t __unused__ *f, uint8_t *p/*out*/, const void *mesg)
{
const H5O_pline_t *pline = (const H5O_pline_t*)mesg;
size_t i, j, name_length;

View File

@ -25,8 +25,8 @@
#define PABLO_MASK H5O_cont_mask
/* PRIVATE PROTOTYPES */
static void *H5O_cont_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_cont_encode(H5F_t *f, uint8 *p, const void *_mesg);
static void *H5O_cont_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static herr_t H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static herr_t H5O_cont_debug(H5F_t *f, const void *_mesg, FILE * stream,
intn indent, intn fwidth);
@ -67,7 +67,7 @@ static intn interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
H5O_cont_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
H5O_cont_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5O_cont_t *cont = NULL;
@ -105,7 +105,7 @@ H5O_cont_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
H5O_cont_encode(H5F_t *f, uint8 *p, const void *_mesg)
H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;

View File

@ -28,8 +28,8 @@ static char RcsId[] = "@(#)$Revision$";
#define PABLO_MASK H5O_dtype_mask
/* PRIVATE PROTOTYPES */
static herr_t H5O_dtype_encode (H5F_t *f, uint8 *p, const void *mesg);
static void *H5O_dtype_decode (H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_dtype_encode (H5F_t *f, uint8_t *p, const void *mesg);
static void *H5O_dtype_decode (H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static void *H5O_dtype_copy (const void *_mesg, void *_dest);
static size_t H5O_dtype_size (H5F_t *f, const void *_mesg);
static herr_t H5O_dtype_reset (void *_mesg);
@ -76,7 +76,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static herr_t
H5O_dtype_decode_helper(const uint8 **pp, H5T_t *dt)
H5O_dtype_decode_helper(const uint8_t **pp, H5T_t *dt)
{
uintn flags, perm_word, version;
intn i, j;
@ -251,7 +251,7 @@ H5O_dtype_decode_helper(const uint8 **pp, H5T_t *dt)
*-------------------------------------------------------------------------
*/
static herr_t
H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt)
H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
{
uintn flags = 0;
uintn perm_word;
@ -403,13 +403,13 @@ H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt)
UINT16ENCODE(*pp, dt->u.atomic.offset);
UINT16ENCODE(*pp, dt->u.atomic.prec);
assert (dt->u.atomic.u.f.epos<=255);
*(*pp)++ = (uint8)(dt->u.atomic.u.f.epos);
*(*pp)++ = (uint8_t)(dt->u.atomic.u.f.epos);
assert (dt->u.atomic.u.f.esize<=255);
*(*pp)++ = (uint8)(dt->u.atomic.u.f.esize);
*(*pp)++ = (uint8_t)(dt->u.atomic.u.f.esize);
assert (dt->u.atomic.u.f.mpos<=255);
*(*pp)++ = (uint8)(dt->u.atomic.u.f.mpos);
*(*pp)++ = (uint8_t)(dt->u.atomic.u.f.mpos);
assert (dt->u.atomic.u.f.msize<=255);
*(*pp)++ = (uint8)(dt->u.atomic.u.f.msize);
*(*pp)++ = (uint8_t)(dt->u.atomic.u.f.msize);
UINT32ENCODE(*pp, dt->u.atomic.u.f.ebias);
break;
@ -498,7 +498,7 @@ H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt)
function using malloc() and is returned to the caller.
--------------------------------------------------------------------------*/
static void *
H5O_dtype_decode(H5F_t __unused__ *f, const uint8 *p,
H5O_dtype_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
H5T_t *dt = NULL;
@ -540,7 +540,7 @@ H5O_dtype_decode(H5F_t __unused__ *f, const uint8 *p,
message in the "raw" disk form.
--------------------------------------------------------------------------*/
static herr_t
H5O_dtype_encode(H5F_t __unused__ *f, uint8 *p, const void *mesg)
H5O_dtype_encode(H5F_t __unused__ *f, uint8_t *p, const void *mesg)
{
const H5T_t *dt = (const H5T_t *) mesg;

View File

@ -14,8 +14,8 @@
#define PABLO_MASK H5O_efl_mask
/* PRIVATE PROTOTYPES */
static void *H5O_efl_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_efl_encode(H5F_t *f, uint8 *p, const void *_mesg);
static void *H5O_efl_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static herr_t H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_efl_copy(const void *_mesg, void *_dest);
static size_t H5O_efl_size(H5F_t *f, const void *_mesg);
static herr_t H5O_efl_reset(void *_mesg);
@ -64,7 +64,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
H5O_efl_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
H5O_efl_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5O_efl_t *mesg = NULL;
intn i, version;
@ -148,7 +148,7 @@ H5O_efl_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
H5O_efl_encode(H5F_t *f, uint8 *p, const void *_mesg)
H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
int i;
@ -406,7 +406,7 @@ H5O_efl_total_size (H5O_efl_t *efl)
*/
herr_t
H5O_efl_read (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
hsize_t size, uint8 *buf)
hsize_t size, uint8_t *buf)
{
int i, fd=-1;
size_t to_read, cur, skip=0;
@ -418,7 +418,7 @@ H5O_efl_read (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
/* Check args */
assert (efl && efl->nused>0);
assert (addr && H5F_addr_defined (addr));
assert (size < MAX_SIZET);
assert (size < SIZET_MAX);
assert (buf || 0==size);
/* Find the first efl member from which to read */
@ -490,7 +490,7 @@ H5O_efl_read (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
*/
herr_t
H5O_efl_write (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
hsize_t size, const uint8 *buf)
hsize_t size, const uint8_t *buf)
{
int i, fd=-1;
size_t to_write, cur, skip=0;
@ -501,7 +501,7 @@ H5O_efl_write (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
/* Check args */
assert (efl && efl->nused>0);
assert (addr && H5F_addr_defined (addr));
assert (size < MAX_SIZET);
assert (size < SIZET_MAX);
assert (buf || 0==size);
/* Find the first efl member in which to write */

View File

@ -16,8 +16,8 @@
#define PABLO_MASK H5O_fill_mask
static void *H5O_fill_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_fill_encode(H5F_t *f, uint8 *p, const void *_mesg);
static void *H5O_fill_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static herr_t H5O_fill_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_fill_copy(const void *_mesg, void *_dest);
static size_t H5O_fill_size(H5F_t *f, const void *_mesg);
static herr_t H5O_fill_reset(void *_mesg);
@ -61,7 +61,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
H5O_fill_decode(H5F_t __unused__ *f, const uint8 *p,
H5O_fill_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
H5O_fill_t *mesg=NULL;
@ -111,7 +111,7 @@ H5O_fill_decode(H5F_t __unused__ *f, const uint8 *p,
*-------------------------------------------------------------------------
*/
static herr_t
H5O_fill_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg)
H5O_fill_encode(H5F_t __unused__ *f, uint8_t *p, const void *_mesg)
{
const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg;

View File

@ -14,8 +14,8 @@
#include <H5Oprivate.h>
/* PRIVATE PROTOTYPES */
static void *H5O_layout_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_layout_encode(H5F_t *f, uint8 *p, const void *_mesg);
static void *H5O_layout_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static herr_t H5O_layout_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_layout_copy(const void *_mesg, void *_dest);
static size_t H5O_layout_size(H5F_t *f, const void *_mesg);
static herr_t H5O_layout_debug(H5F_t *f, const void *_mesg, FILE * stream,
@ -64,7 +64,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
H5O_layout_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
H5O_layout_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5O_layout_t *mesg = NULL;
intn i, version;
@ -132,7 +132,7 @@ H5O_layout_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
H5O_layout_encode(H5F_t *f, uint8 *p, const void *_mesg)
H5O_layout_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
int i;

View File

@ -14,8 +14,8 @@
#define PABLO_MASK H5O_mtime_mask
static void *H5O_mtime_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_mtime_encode(H5F_t *f, uint8 *p, const void *_mesg);
static void *H5O_mtime_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static herr_t H5O_mtime_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_mtime_copy(const void *_mesg, void *_dest);
static size_t H5O_mtime_size(H5F_t *f, const void *_mesg);
static herr_t H5O_mtime_debug(H5F_t *f, const void *_mesg, FILE *stream,
@ -60,7 +60,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
H5O_mtime_decode(H5F_t __unused__ *f, const uint8 *p,
H5O_mtime_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
time_t *mesg, the_time;
@ -172,7 +172,7 @@ H5O_mtime_decode(H5F_t __unused__ *f, const uint8 *p,
*-------------------------------------------------------------------------
*/
static herr_t
H5O_mtime_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg)
H5O_mtime_encode(H5F_t __unused__ *f, uint8_t *p, const void *_mesg)
{
const time_t *mesg = (const time_t *) _mesg;
struct tm *tm;

View File

@ -22,8 +22,8 @@
#define PABLO_MASK H5O_name_mask
/* PRIVATE PROTOTYPES */
static void *H5O_name_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_name_encode(H5F_t *f, uint8 *p, const void *_mesg);
static void *H5O_name_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static herr_t H5O_name_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_name_copy(const void *_mesg, void *_dest);
static size_t H5O_name_size(H5F_t *f, const void *_mesg);
static herr_t H5O_name_reset(void *_mesg);
@ -69,7 +69,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
H5O_name_decode(H5F_t __unused__ *f, const uint8 *p,
H5O_name_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
H5O_name_t *mesg;
@ -109,7 +109,7 @@ H5O_name_decode(H5F_t __unused__ *f, const uint8 *p,
*-------------------------------------------------------------------------
*/
static herr_t
H5O_name_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg)
H5O_name_encode(H5F_t __unused__ *f, uint8_t *p, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;

View File

@ -71,8 +71,8 @@ typedef struct H5O_class_t {
intn id; /*message type ID on disk */
const char *name; /*for debugging */
size_t native_size; /*size of native message */
void *(*decode)(H5F_t*, const uint8*, struct H5O_shared_t*);
herr_t (*encode)(H5F_t*, uint8*, const void*);
void *(*decode)(H5F_t*, const uint8_t*, struct H5O_shared_t*);
herr_t (*encode)(H5F_t*, uint8_t*, const void*);
void *(*copy)(const void*, void*); /*copy native value */
size_t (*raw_size)(H5F_t*, const void*);/*sizeof raw val */
herr_t (*reset)(void *); /*free nested data structs */
@ -84,9 +84,9 @@ typedef struct H5O_class_t {
typedef struct H5O_mesg_t {
const H5O_class_t *type; /*type of message */
hbool_t dirty; /*raw out of date wrt native */
uint8 flags; /*message flags */
uint8_t flags; /*message flags */
void *native; /*native format message */
uint8 *raw; /*ptr to raw data */
uint8_t *raw; /*ptr to raw data */
size_t raw_size; /*size with alignment */
intn chunkno; /*chunk number for this mesg */
} H5O_mesg_t;
@ -95,7 +95,7 @@ typedef struct H5O_chunk_t {
hbool_t dirty; /*dirty flag */
haddr_t addr; /*chunk file address */
size_t size; /*chunk size */
uint8 *image; /*image of file */
uint8_t *image; /*image of file */
} H5O_chunk_t;
typedef struct H5O_t {
@ -291,9 +291,9 @@ herr_t H5O_debug (H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
/* EFL operators */
hsize_t H5O_efl_total_size (H5O_efl_t *efl);
herr_t H5O_efl_read (H5F_t *f, const H5O_efl_t *efl, haddr_t *addr,
hsize_t size, uint8 *buf);
hsize_t size, uint8_t *buf);
herr_t H5O_efl_write (H5F_t *f, const H5O_efl_t *efl, haddr_t *addr,
hsize_t size, const uint8 *buf);
hsize_t size, const uint8_t *buf);
/* Fill value operators */
herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *type);

View File

@ -25,8 +25,8 @@ static char RcsId[] = "@(#)$Revision$";
#define PABLO_MASK H5O_sdspace_mask
/* PRIVATE PROTOTYPES */
static void *H5O_sdspace_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_sdspace_encode(H5F_t *f, uint8 *p, const void *_mesg);
static void *H5O_sdspace_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static herr_t H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_sdspace_copy(const void *_mesg, void *_dest);
static size_t H5O_sdspace_size(H5F_t *f, const void *_mesg);
static herr_t H5O_sdspace_debug(H5F_t *f, const void *_mesg,
@ -81,7 +81,7 @@ static hbool_t interface_initialize_g = FALSE;
Added a version number and reformatted the message for aligment.
--------------------------------------------------------------------------*/
static void *
H5O_sdspace_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
H5O_sdspace_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5S_simple_t *sdim = NULL;/* New simple dimensionality structure */
void *ret_value = NULL;
@ -175,7 +175,7 @@ H5O_sdspace_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
Added a version number and reformatted the message for aligment.
--------------------------------------------------------------------------*/
static herr_t
H5O_sdspace_encode(H5F_t *f, uint8 *p, const void *mesg)
H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *mesg)
{
const H5S_simple_t *sdim = (const H5S_simple_t *) mesg;
intn u; /* Local counting variable */

View File

@ -18,8 +18,8 @@
#include <H5MMprivate.h>
#include <H5Oprivate.h>
static void *H5O_shared_decode (H5F_t*, const uint8*, H5O_shared_t *sh);
static herr_t H5O_shared_encode (H5F_t*, uint8*, const void*);
static void *H5O_shared_decode (H5F_t*, const uint8_t*, H5O_shared_t *sh);
static herr_t H5O_shared_encode (H5F_t*, uint8_t*, const void*);
static size_t H5O_shared_size (H5F_t*, const void*);
static herr_t H5O_shared_debug (H5F_t*, const void*, FILE*, intn, intn);
@ -64,7 +64,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
H5O_shared_decode (H5F_t *f, const uint8 *buf, H5O_shared_t __unused__ *sh)
H5O_shared_decode (H5F_t *f, const uint8_t *buf, H5O_shared_t __unused__ *sh)
{
H5O_shared_t *mesg;
uintn flags, version;
@ -125,7 +125,7 @@ H5O_shared_decode (H5F_t *f, const uint8 *buf, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
H5O_shared_encode (H5F_t *f, uint8 *buf/*out*/, const void *_mesg)
H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg)
{
const H5O_shared_t *mesg = (const H5O_shared_t *)_mesg;
uintn flags;

View File

@ -23,8 +23,8 @@
#define PABLO_MASK H5O_stab_mask
/* PRIVATE PROTOTYPES */
static void *H5O_stab_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
static herr_t H5O_stab_encode(H5F_t *f, uint8 *p, const void *_mesg);
static void *H5O_stab_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static herr_t H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_stab_copy(const void *_mesg, void *_dest);
static size_t H5O_stab_size(H5F_t *f, const void *_mesg);
static herr_t H5O_stab_debug(H5F_t *f, const void *_mesg,
@ -68,7 +68,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
H5O_stab_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
H5O_stab_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5O_stab_t *stab;
@ -106,7 +106,7 @@ H5O_stab_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
H5O_stab_encode(H5F_t *f, uint8 *p, const void *_mesg)
H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;

View File

@ -119,6 +119,7 @@ H5P_term_interface(void)
for (i = 0; i < H5P_NCLASSES; i++) {
H5I_destroy_group((H5I_type_t)(H5I_TEMPLATE_0 + i));
}
interface_initialize_g = FALSE;
}
/*--------------------------------------------------------------------------

View File

@ -90,6 +90,7 @@ H5R_term_interface(void)
{
/* Free ID group */
H5I_destroy_group(H5I_REFERENCE);
interface_initialize_g = FALSE;
} /* end H5R_term_interface() */
@ -141,10 +142,10 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type,
{
haddr_t addr;
hobj_ref_t *ref=(hobj_ref_t *)_ref; /* Get pointer to correct type of reference struct */
uint8 *p; /* Pointer to OID to store */
uint8_t *p; /* Pointer to OID to store */
/* Set information for reference */
p=(uint8 *)ref->oid;
p=(uint8_t *)ref->oid;
H5F_addr_pack(loc->file,&addr,&sb.objno[0]);
H5F_addr_encode(loc->file,&p,&addr);
break;
@ -155,11 +156,11 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type,
haddr_t addr;
hdset_reg_ref_t *ref=(hdset_reg_ref_t *)_ref; /* Get pointer to correct type of reference struct */
hssize_t buf_size; /* Size of buffer needed to serialize selection */
uint8 *p; /* Pointer to OID to store */
uint8 *buf; /* Buffer to store serialized selection in */
uint8_t *p; /* Pointer to OID to store */
uint8_t *buf; /* Buffer to store serialized selection in */
/* Set information for dataset OID */
p=(uint8 *)ref->oid;
p=(uint8_t *)ref->oid;
H5F_addr_pack(loc->file,&addr,&sb.objno[0]);
H5F_addr_encode(loc->file,&p,&addr);
@ -292,7 +293,7 @@ H5R_dereference(H5D_t *dset, H5R_type_t ref_type, void *_ref)
H5D_t *dataset; /* Pointer to dataset to open */
hobj_ref_t *ref=(hobj_ref_t *)_ref; /* Only object references currently supported */
H5G_entry_t ent; /* Symbol table entry */
uint8 *p; /* Pointer to OID to store */
uint8_t *p; /* Pointer to OID to store */
hid_t ret_value = FAIL;
FUNC_ENTER(H5R_dereference, FAIL);
@ -308,8 +309,8 @@ H5R_dereference(H5D_t *dset, H5R_type_t ref_type, void *_ref)
HDmemset(&ent,0,sizeof(H5G_entry_t));
ent.type=H5G_NOTHING_CACHED;
ent.file=H5D_get_file(dset);
p=(uint8 *)ref->oid;
H5F_addr_decode(ent.file,(const uint8 **)&p,&(ent.header));
p=(uint8_t *)ref->oid;
H5F_addr_decode(ent.file,(const uint8_t **)&p,&(ent.header));
/* Open the dataset object */
if ((dataset=H5D_open_oid(&ent)) == NULL) {

View File

@ -122,6 +122,7 @@ H5RA_term_interface(void)
H5I_destroy_group(H5I_RAGGED);
H5T_close(H5RA_meta_type_g);
H5RA_meta_type_g = NULL;
interface_initialize_g = FALSE;
}
@ -690,7 +691,7 @@ H5RA_write(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
hsize_t raw_cur_size[2]; /*raw data current size */
hssize_t hs_offset[2]; /*hyperslab offset */
hsize_t hs_size[2]; /*hyperslab size */
uint8 *raw_buf=NULL; /*raw buffer */
uint8_t *raw_buf=NULL; /*raw buffer */
size_t type_size; /*size of the TYPE argument */
hsize_t i;
@ -778,7 +779,7 @@ H5RA_write(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
for (i=0; i<nrows; i++) {
if (size[i]>raw_cur_size[1]) {
H5RA_fix_overflow(ra, type, meta+i, size[i]-raw_cur_size[1],
(uint8*)(buf[i])+raw_cur_size[1]*type_size);
(uint8_t*)(buf[i])+raw_cur_size[1]*type_size);
}
meta[i].nelmts = size[i];
}
@ -1041,7 +1042,7 @@ H5RA_read(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
hsize_t raw_read_size[2]; /*amount of raw data to read */
hssize_t hs_offset[2]; /*hyperslab offset */
hsize_t hs_size[2]; /*hyperslab size */
uint8 *raw_buf=NULL; /*raw buffer */
uint8_t *raw_buf=NULL; /*raw buffer */
size_t type_size; /*size of the TYPE argument */
void **buf_out=NULL; /*output BUF values */
hsize_t i; /*counter */

View File

@ -207,6 +207,7 @@ H5S_term_interface(void)
for (i=0; i<H5S_nconv_g; i++) H5MM_xfree(H5S_conv_g[i]);
H5S_conv_g = H5MM_xfree(H5S_conv_g);
H5S_nconv_g = H5S_aconv_g = 0;
interface_initialize_g = FALSE;
}
@ -795,7 +796,7 @@ H5S_get_npoints_max(const H5S_t *ds)
if (ds->extent.u.simple.max) {
for (ret_value=1, i=0; i<ds->extent.u.simple.rank; i++) {
if (H5S_UNLIMITED==ds->extent.u.simple.max[i]) {
ret_value = MAX_HSIZET;
ret_value = HSIZET_MAX;
break;
} else {
ret_value *= ds->extent.u.simple.max[i];

View File

@ -177,7 +177,7 @@ H5S_all_fgath (H5F_t *f, const struct H5O_layout_t *layout,
hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of slab in file*/
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */
uint8 *buf=(uint8 *)_buf; /* Alias for pointer arithmetic */
uint8_t *buf=(uint8_t*)_buf; /*for pointer arithmetic*/
hsize_t acc; /*accumulator */
intn space_ndims; /*dimensionality of space*/
intn i; /*counters */
@ -265,7 +265,7 @@ H5S_all_fscat (H5F_t *f, const struct H5O_layout_t *layout,
hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of hyperslab */
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero vector */
const uint8 *buf=(const uint8 *)_buf; /* Alias for pointer arithmetic */
const uint8_t *buf=(const uint8_t*)_buf; /*for pointer arithmetic*/
hsize_t acc; /*accumulator */
intn space_ndims; /*space dimensionality */
intn i; /*counters */
@ -350,8 +350,8 @@ H5S_all_mgath (const void *_buf, size_t elmt_size,
hsize_t mem_size[H5O_LAYOUT_NDIMS]; /*total size of app buf */
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */
const uint8 *buf=(const uint8 *)_buf; /* Get local copies for address arithmetic */
uint8 *tconv_buf=(uint8 *)_tconv_buf;
const uint8_t *buf=(const uint8_t*)_buf; /* Get local copies for address arithmetic */
uint8_t *tconv_buf=(uint8_t*)_tconv_buf;
hsize_t acc; /*accumulator */
intn space_ndims; /*dimensionality of space*/
intn i; /*counters */
@ -438,8 +438,8 @@ H5S_all_mscat (const void *_tconv_buf, size_t elmt_size,
hsize_t mem_size[H5O_LAYOUT_NDIMS]; /*total size of app buf */
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */
uint8 *buf=(uint8 *)_buf; /* Get local copies for address arithmetic */
const uint8 *tconv_buf=(const uint8 *)_tconv_buf;
uint8_t *buf=(uint8_t*)_buf; /* Get local copies for address arithmetic */
const uint8_t *tconv_buf=(const uint8_t *)_tconv_buf;
hsize_t acc; /*accumulator */
intn space_ndims; /*dimensionality of space*/
intn i; /*counters */
@ -584,7 +584,7 @@ H5S_all_npoints (const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
H5S_all_select_serialize (const H5S_t *space, uint8 *buf)
H5S_all_select_serialize (const H5S_t *space, uint8_t *buf)
{
herr_t ret_value=FAIL; /* return value */
@ -593,10 +593,10 @@ H5S_all_select_serialize (const H5S_t *space, uint8 *buf)
assert(space);
/* Store the preamble information */
UINT32ENCODE(buf, (uint32)space->select.type); /* Store the type of selection */
UINT32ENCODE(buf, (uint32)1); /* Store the version number */
UINT32ENCODE(buf, (uint32)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32)0); /* Store the additional information length */
UINT32ENCODE(buf, (uint32_t)space->select.type); /* Store the type of selection */
UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */
UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */
/* Set success */
ret_value=SUCCEED;

View File

@ -723,7 +723,7 @@ H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info)
} /* end else */
/* Advance the pointer in the buffer */
fhyper_info->dst = ((uint8 *)fhyper_info->dst) +
fhyper_info->dst = ((uint8_t *)fhyper_info->dst) +
region_size*fhyper_info->elmt_size;
/* Increment the number of elements read */
@ -989,7 +989,7 @@ H5S_hyper_fwrite (intn dim, H5S_hyper_fhyper_info_t *fhyper_info)
} /* end else */
/* Advance the pointer in the buffer */
fhyper_info->src = ((const uint8 *)fhyper_info->src) +
fhyper_info->src = ((const uint8_t *)fhyper_info->src) +
region_size*fhyper_info->elmt_size;
/* Increment the number of elements read */
@ -1243,7 +1243,7 @@ H5S_hyper_mread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info)
}
/* Advance the pointer in the buffer */
fhyper_info->dst = ((uint8 *)fhyper_info->dst) +
fhyper_info->dst = ((uint8_t *)fhyper_info->dst) +
region_size*fhyper_info->elmt_size;
/* Increment the number of elements read */
@ -1514,7 +1514,7 @@ H5S_hyper_mwrite (intn dim, H5S_hyper_fhyper_info_t *fhyper_info)
}
/* Advance the pointer in the buffer */
fhyper_info->src = ((const uint8 *)fhyper_info->src) +
fhyper_info->src = ((const uint8_t *)fhyper_info->src) +
region_size*fhyper_info->elmt_size;
/* Increment the number of elements read */
@ -2737,11 +2737,11 @@ H5S_hyper_select_serial_size (const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
H5S_hyper_select_serialize (const H5S_t *space, uint8 *buf)
H5S_hyper_select_serialize (const H5S_t *space, uint8_t *buf)
{
H5S_hyper_node_t *curr; /* Hyperslab information nodes */
uint8 *lenp; /* pointer to length location for later storage */
uint32 len=0; /* number of bytes used */
uint8_t *lenp; /* pointer to length location for later storage */
uint32_t len=0; /* number of bytes used */
intn i; /* local counting variable */
herr_t ret_value=FAIL; /* return value */
@ -2750,18 +2750,18 @@ H5S_hyper_select_serialize (const H5S_t *space, uint8 *buf)
assert(space);
/* Store the preamble information */
UINT32ENCODE(buf, (uint32)space->select.type); /* Store the type of selection */
UINT32ENCODE(buf, (uint32)1); /* Store the version number */
UINT32ENCODE(buf, (uint32)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32_t)space->select.type); /* Store the type of selection */
UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */
UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
lenp=buf; /* keep the pointer to the length location for later */
buf+=4; /* skip over space for length */
/* Encode number of dimensions */
UINT32ENCODE(buf, (uint32)space->extent.u.simple.rank);
UINT32ENCODE(buf, (uint32_t)space->extent.u.simple.rank);
len+=4;
/* Encode number of elements */
UINT32ENCODE(buf, (uint32)space->select.sel_info.hslab.hyper_lst->count);
UINT32ENCODE(buf, (uint32_t)space->select.sel_info.hslab.hyper_lst->count);
len+=4;
/* Encode each point in selection */
@ -2772,17 +2772,17 @@ H5S_hyper_select_serialize (const H5S_t *space, uint8 *buf)
/* Encode starting point */
for(i=0; i<space->extent.u.simple.rank; i++)
UINT32ENCODE(buf, (uint32)curr->start[i]);
UINT32ENCODE(buf, (uint32_t)curr->start[i]);
/* Encode starting point */
for(i=0; i<space->extent.u.simple.rank; i++)
UINT32ENCODE(buf, (uint32)curr->end[i]);
UINT32ENCODE(buf, (uint32_t)curr->end[i]);
curr=curr->next;
} /* end while */
/* Encode length */
UINT32ENCODE(lenp, (uint32)len); /* Store the length of the extra information */
UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */
/* Set success */
ret_value=SUCCEED;

View File

@ -39,7 +39,7 @@ static intn interface_initialize_g = FALSE;
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
H5S_none_select_serialize (const H5S_t *space, uint8 *buf)
H5S_none_select_serialize (const H5S_t *space, uint8_t *buf)
{
herr_t ret_value=FAIL; /* return value */
@ -48,10 +48,10 @@ H5S_none_select_serialize (const H5S_t *space, uint8 *buf)
assert(space);
/* Store the preamble information */
UINT32ENCODE(buf, (uint32)space->select.type); /* Store the type of selection */
UINT32ENCODE(buf, (uint32)1); /* Store the version number */
UINT32ENCODE(buf, (uint32)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32)0); /* Store the additional information length */
UINT32ENCODE(buf, (uint32_t)space->select.type); /* Store the type of selection */
UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */
UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */
/* Set success */
ret_value=SUCCEED;

View File

@ -275,10 +275,10 @@ H5S_point_fgath (H5F_t *f, const struct H5O_layout_t *layout,
hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of slab in file*/
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */
uint8 *buf=(uint8 *)_buf; /* Alias for pointer arithmetic */
uintn ndims; /* Number of dimensions of dataset */
uint8_t *buf=(uint8_t *)_buf; /* Alias for pointer arithmetic */
uintn ndims; /* Number of dimensions of dataset */
intn i; /*counters */
size_t num_read; /* number of elements read into buffer */
size_t num_read; /* number of elements read into buffer */
FUNC_ENTER (H5S_point_fgath, 0);
@ -382,7 +382,7 @@ H5S_point_fscat (H5F_t *f, const struct H5O_layout_t *layout,
hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of hyperslab */
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero vector */
const uint8 *buf=(const uint8 *)_buf; /* Alias for pointer arithmetic */
const uint8_t *buf=(const uint8_t *)_buf; /* Alias for pointer arithmetic */
uintn ndims; /* Number of dimensions of dataset */
intn i; /*counters */
size_t num_written; /* number of elements written from buffer */
@ -494,8 +494,8 @@ H5S_point_mgath (const void *_buf, size_t elmt_size,
size_t nelmts, void *_tconv_buf/*out*/)
{
hsize_t mem_size[H5O_LAYOUT_NDIMS]; /*total size of app buf */
const uint8 *buf=(const uint8 *)_buf; /* Get local copies for address arithmetic */
uint8 *tconv_buf=(uint8 *)_tconv_buf;
const uint8_t *buf=(const uint8_t *)_buf; /* Get local copies for address arithmetic */
uint8_t *tconv_buf=(uint8_t *)_tconv_buf;
hsize_t acc; /* coordinate accumulator */
hsize_t off; /* coordinate offset */
intn space_ndims; /*dimensionality of space*/
@ -570,8 +570,8 @@ H5S_point_mscat (const void *_tconv_buf, size_t elmt_size,
size_t nelmts, void *_buf/*out*/)
{
hsize_t mem_size[H5O_LAYOUT_NDIMS]; /*total size of app buf */
uint8 *buf=(uint8 *)_buf; /* Get local copies for address arithmetic */
const uint8 *tconv_buf=(const uint8 *)_tconv_buf;
uint8_t *buf=(uint8_t *)_buf; /* Get local copies for address arithmetic */
const uint8_t *tconv_buf=(const uint8_t *)_tconv_buf;
hsize_t acc; /* coordinate accumulator */
hsize_t off; /* coordinate offset */
intn space_ndims; /*dimensionality of space*/
@ -898,11 +898,11 @@ H5S_point_select_serial_size (const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
H5S_point_select_serialize (const H5S_t *space, uint8 *buf)
H5S_point_select_serialize (const H5S_t *space, uint8_t *buf)
{
H5S_pnt_node_t *curr; /* Point information nodes */
uint8 *lenp; /* pointer to length location for later storage */
uint32 len=0; /* number of bytes used */
uint8_t *lenp; /* pointer to length location for later storage */
uint32_t len=0; /* number of bytes used */
intn i; /* local counting variable */
herr_t ret_value=FAIL; /* return value */
@ -911,18 +911,18 @@ H5S_point_select_serialize (const H5S_t *space, uint8 *buf)
assert(space);
/* Store the preamble information */
UINT32ENCODE(buf, (uint32)space->select.type); /* Store the type of selection */
UINT32ENCODE(buf, (uint32)1); /* Store the version number */
UINT32ENCODE(buf, (uint32)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32_t)space->select.type); /* Store the type of selection */
UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */
UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
lenp=buf; /* keep the pointer to the length location for later */
buf+=4; /* skip over space for length */
/* Encode number of dimensions */
UINT32ENCODE(buf, (uint32)space->extent.u.simple.rank);
UINT32ENCODE(buf, (uint32_t)space->extent.u.simple.rank);
len+=4;
/* Encode number of elements */
UINT32ENCODE(buf, (uint32)space->select.num_elem);
UINT32ENCODE(buf, (uint32_t)space->select.num_elem);
len+=4;
/* Encode each point in selection */
@ -933,13 +933,13 @@ H5S_point_select_serialize (const H5S_t *space, uint8 *buf)
/* Encode each point */
for(i=0; i<space->extent.u.simple.rank; i++)
UINT32ENCODE(buf, (uint32)curr->pnt[i]);
UINT32ENCODE(buf, (uint32_t)curr->pnt[i]);
curr=curr->next;
} /* end while */
/* Encode length */
UINT32ENCODE(lenp, (uint32)len); /* Store the length of the extra information */
UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */
/* Set success */
ret_value=SUCCEED;

View File

@ -81,8 +81,8 @@ typedef struct H5S_hyper_node_tag {
uintn size; /* Size of cached block (in elements) */
uintn left; /* Elements left to access in block */
hid_t block_id; /* Temporary buffer ID */
uint8 *block; /* Pointer into temporary buffer for cache */
uint8 *pos; /* Pointer to current location within block */
uint8_t *block; /* Pointer into temporary buffer for cache */
uint8_t *pos; /* Pointer to current location within block */
} cinfo;
struct H5S_hyper_node_tag *next; /* pointer to next hyperslab in list */
} H5S_hyper_node_t;
@ -326,7 +326,7 @@ herr_t H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, intn indent,
herr_t H5S_register(H5S_sel_type cls, const H5S_fconv_t *fconv,
const H5S_mconv_t *mconv);
hssize_t H5S_select_serial_size(const H5S_t *space);
herr_t H5S_select_serialize(const H5S_t *space, uint8 *buf);
herr_t H5S_select_serialize(const H5S_t *space, uint8_t *buf);
/* Point select functions */
herr_t H5S_point_add (H5S_t *space, size_t num_elemn, const hssize_t **coord);
@ -335,12 +335,12 @@ hsize_t H5S_point_npoints (const H5S_t *space);
herr_t H5S_point_copy (H5S_t *dst, const H5S_t *src);
htri_t H5S_point_select_valid (const H5S_t *space);
hssize_t H5S_point_select_serial_size(const H5S_t *space);
herr_t H5S_point_select_serialize(const H5S_t *space, uint8 *buf);
herr_t H5S_point_select_serialize(const H5S_t *space, uint8_t *buf);
/* "All" select functions */
herr_t H5S_all_release (H5S_t *space);
hsize_t H5S_all_npoints (const H5S_t *space);
herr_t H5S_all_select_serialize(const H5S_t *space, uint8 *buf);
herr_t H5S_all_select_serialize(const H5S_t *space, uint8_t *buf);
/* Hyperslab selection functions */
herr_t H5S_hyper_add (H5S_t *space, const hssize_t *start, const hsize_t *end);
@ -354,10 +354,10 @@ htri_t H5S_hyper_select_valid (const H5S_t *space);
herr_t H5S_hyper_node_add (H5S_hyper_node_t **head, intn endflag, intn rank, const hssize_t *start, const hsize_t *size);
herr_t H5S_hyper_clip (H5S_t *space, H5S_hyper_node_t *nodes, H5S_hyper_node_t **uniq, H5S_hyper_node_t **overlap);
hssize_t H5S_hyper_select_serial_size(const H5S_t *space);
herr_t H5S_hyper_select_serialize(const H5S_t *space, uint8 *buf);
herr_t H5S_hyper_select_serialize(const H5S_t *space, uint8_t *buf);
/* "None" selection functions */
herr_t H5S_none_select_serialize(const H5S_t *space, uint8 *buf);
herr_t H5S_none_select_serialize(const H5S_t *space, uint8_t *buf);
#ifdef HAVE_PARALLEL
/* MPI-IO function to read directly from app buffer to file rky980813 */

View File

@ -1007,7 +1007,7 @@ H5S_select_serial_size (const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
H5S_select_serialize (const H5S_t *space, uint8 *buf)
H5S_select_serialize (const H5S_t *space, uint8_t *buf)
{
herr_t ret_value=FAIL; /* return value */

756
src/H5T.c
View File

@ -139,7 +139,7 @@ H5T_init_interface(void)
* Initialize pre-defined native data types from code generated during
* the library configuration by H5detect.
*/
ret_value = H5T_init();
ret_value = H5T_native_open();
/*------------------------------------------------------------
* Native types
@ -606,7 +606,8 @@ H5T_init_interface(void)
*/
/* Object pointer (i.e. object header address in file) */
if (NULL==(dt = H5MM_calloc(sizeof(H5T_t)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
dt->state = H5T_STATE_IMMUTABLE;
H5F_addr_undef (&(dt->ent.header));
@ -624,7 +625,8 @@ H5T_init_interface(void)
}
/* Dataset Region pointer (i.e. selection inside a dataset) */
if (NULL==(dt = H5MM_calloc(sizeof(H5T_t)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
dt->state = H5T_STATE_IMMUTABLE;
H5F_addr_undef (&(dt->ent.header));
@ -682,6 +684,14 @@ H5T_init_interface(void)
HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
/*
* Native conversions should be listed last since we can use hardware to
* perform the conversion. We list the odd types like `llong', `long',
* and `short' before the usual types like `int' and `char' so that when
* diagnostics are printed we favor the usual names over the odd names
* when two or more types are the same size.
*/
if (H5Tregister_hard("flt_dbl", H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE,
H5T_conv_float_double)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
@ -693,6 +703,466 @@ H5T_init_interface(void)
"unable to register conversion function");
}
/* from long long */
if (H5Tregister_hard("llong_ullong", H5T_NATIVE_LLONG, H5T_NATIVE_ULLONG,
H5T_conv_llong_ullong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ullong_llong", H5T_NATIVE_ULLONG, H5T_NATIVE_LLONG,
H5T_conv_ullong_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("llong_long", H5T_NATIVE_LLONG, H5T_NATIVE_LONG,
H5T_conv_llong_long)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("llong_ulong", H5T_NATIVE_LLONG, H5T_NATIVE_ULONG,
H5T_conv_llong_ulong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ullong_long", H5T_NATIVE_ULLONG, H5T_NATIVE_LONG,
H5T_conv_ullong_long)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ullong_ulong", H5T_NATIVE_ULLONG, H5T_NATIVE_ULONG,
H5T_conv_ullong_ulong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("llong_short", H5T_NATIVE_LLONG, H5T_NATIVE_SHORT,
H5T_conv_llong_short)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("llong_ushort", H5T_NATIVE_LLONG, H5T_NATIVE_USHORT,
H5T_conv_llong_ushort)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ullong_short", H5T_NATIVE_ULLONG, H5T_NATIVE_SHORT,
H5T_conv_ullong_short)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ullong_ushort", H5T_NATIVE_ULLONG, H5T_NATIVE_USHORT,
H5T_conv_ullong_ushort)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("llong_int", H5T_NATIVE_LLONG, H5T_NATIVE_INT,
H5T_conv_llong_int)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("llong_uint", H5T_NATIVE_LLONG, H5T_NATIVE_UINT,
H5T_conv_llong_uint)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ullong_int", H5T_NATIVE_ULLONG, H5T_NATIVE_INT,
H5T_conv_ullong_int)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ullong_uint", H5T_NATIVE_ULLONG, H5T_NATIVE_UINT,
H5T_conv_ullong_uint)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("llong_char", H5T_NATIVE_LLONG, H5T_NATIVE_CHAR,
H5T_conv_llong_char)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("llong_uchar", H5T_NATIVE_LLONG, H5T_NATIVE_UCHAR,
H5T_conv_llong_uchar)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ullong_char", H5T_NATIVE_ULLONG, H5T_NATIVE_CHAR,
H5T_conv_ullong_char)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ullong_uchar", H5T_NATIVE_ULLONG, H5T_NATIVE_UCHAR,
H5T_conv_ullong_uchar)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
/* From long */
if (H5Tregister_hard("long_llong", H5T_NATIVE_LONG, H5T_NATIVE_LLONG,
H5T_conv_long_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("long_ullong", H5T_NATIVE_LONG, H5T_NATIVE_ULLONG,
H5T_conv_long_ullong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ulong_llong", H5T_NATIVE_ULONG, H5T_NATIVE_LLONG,
H5T_conv_ulong_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ulong_ullong", H5T_NATIVE_ULONG, H5T_NATIVE_ULLONG,
H5T_conv_ulong_ullong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("long_ulong", H5T_NATIVE_LONG, H5T_NATIVE_ULONG,
H5T_conv_long_ulong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ulong_long", H5T_NATIVE_ULONG, H5T_NATIVE_LONG,
H5T_conv_ulong_long)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("long_short", H5T_NATIVE_LONG, H5T_NATIVE_SHORT,
H5T_conv_long_short)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("long_ushort", H5T_NATIVE_LONG, H5T_NATIVE_USHORT,
H5T_conv_long_ushort)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ulong_short", H5T_NATIVE_ULONG, H5T_NATIVE_SHORT,
H5T_conv_ulong_short)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ulong_ushort", H5T_NATIVE_ULONG, H5T_NATIVE_USHORT,
H5T_conv_ulong_ushort)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("long_int", H5T_NATIVE_LONG, H5T_NATIVE_INT,
H5T_conv_long_int)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("long_uint", H5T_NATIVE_LONG, H5T_NATIVE_UINT,
H5T_conv_long_uint)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ulong_int", H5T_NATIVE_ULONG, H5T_NATIVE_INT,
H5T_conv_ulong_int)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ulong_uint", H5T_NATIVE_ULONG, H5T_NATIVE_UINT,
H5T_conv_ulong_uint)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("long_char", H5T_NATIVE_LONG, H5T_NATIVE_CHAR,
H5T_conv_long_char)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("long_uchar", H5T_NATIVE_LONG, H5T_NATIVE_UCHAR,
H5T_conv_long_uchar)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ulong_char", H5T_NATIVE_ULONG, H5T_NATIVE_CHAR,
H5T_conv_ulong_char)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ulong_uchar", H5T_NATIVE_ULONG, H5T_NATIVE_UCHAR,
H5T_conv_ulong_uchar)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
/* From short */
if (H5Tregister_hard("short_llong", H5T_NATIVE_SHORT, H5T_NATIVE_LLONG,
H5T_conv_short_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("short_ullong", H5T_NATIVE_SHORT, H5T_NATIVE_ULLONG,
H5T_conv_short_ullong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ushort_llong", H5T_NATIVE_USHORT, H5T_NATIVE_LLONG,
H5T_conv_ushort_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ushort_ullong", H5T_NATIVE_USHORT, H5T_NATIVE_ULLONG,
H5T_conv_ushort_ullong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("short_long", H5T_NATIVE_SHORT, H5T_NATIVE_LONG,
H5T_conv_short_long)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("short_ulong", H5T_NATIVE_SHORT, H5T_NATIVE_ULONG,
H5T_conv_short_ulong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ushort_long", H5T_NATIVE_USHORT, H5T_NATIVE_LONG,
H5T_conv_ushort_long)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ushort_ulong", H5T_NATIVE_USHORT, H5T_NATIVE_ULONG,
H5T_conv_ushort_ulong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("short_ushort", H5T_NATIVE_SHORT, H5T_NATIVE_USHORT,
H5T_conv_short_ushort)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ushort_short", H5T_NATIVE_USHORT, H5T_NATIVE_SHORT,
H5T_conv_ushort_short)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("short_int", H5T_NATIVE_SHORT, H5T_NATIVE_INT,
H5T_conv_short_int)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("short_uint", H5T_NATIVE_SHORT, H5T_NATIVE_UINT,
H5T_conv_short_uint)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ushort_int", H5T_NATIVE_USHORT, H5T_NATIVE_INT,
H5T_conv_ushort_int)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ushort_uint", H5T_NATIVE_USHORT, H5T_NATIVE_UINT,
H5T_conv_ushort_uint)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("short_char", H5T_NATIVE_SHORT, H5T_NATIVE_CHAR,
H5T_conv_short_char)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("short_uchar", H5T_NATIVE_SHORT, H5T_NATIVE_UCHAR,
H5T_conv_short_uchar)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ushort_char", H5T_NATIVE_USHORT, H5T_NATIVE_CHAR,
H5T_conv_ushort_char)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("ushort_uchar", H5T_NATIVE_USHORT, H5T_NATIVE_UCHAR,
H5T_conv_ushort_uchar)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
/* From int */
if (H5Tregister_hard("int_llong", H5T_NATIVE_INT, H5T_NATIVE_LLONG,
H5T_conv_int_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("int_ullong", H5T_NATIVE_INT, H5T_NATIVE_ULLONG,
H5T_conv_int_ullong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uint_llong", H5T_NATIVE_UINT, H5T_NATIVE_LLONG,
H5T_conv_uint_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uint_ullong", H5T_NATIVE_UINT, H5T_NATIVE_ULLONG,
H5T_conv_uint_ullong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("int_long", H5T_NATIVE_INT, H5T_NATIVE_LONG,
H5T_conv_int_long)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("int_ulong", H5T_NATIVE_INT, H5T_NATIVE_ULONG,
H5T_conv_int_ulong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uint_long", H5T_NATIVE_UINT, H5T_NATIVE_LONG,
H5T_conv_uint_long)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uint_ulong", H5T_NATIVE_UINT, H5T_NATIVE_ULONG,
H5T_conv_uint_ulong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("int_short", H5T_NATIVE_INT, H5T_NATIVE_SHORT,
H5T_conv_int_short)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("int_ushort", H5T_NATIVE_INT, H5T_NATIVE_USHORT,
H5T_conv_int_ushort)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uint_short", H5T_NATIVE_UINT, H5T_NATIVE_SHORT,
H5T_conv_uint_short)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uint_ushort", H5T_NATIVE_UINT, H5T_NATIVE_USHORT,
H5T_conv_uint_ushort)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("int_uint", H5T_NATIVE_INT, H5T_NATIVE_UINT,
H5T_conv_int_uint)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uint_int", H5T_NATIVE_UINT, H5T_NATIVE_INT,
H5T_conv_uint_int)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("int_char", H5T_NATIVE_INT, H5T_NATIVE_CHAR,
H5T_conv_int_char)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("int_uchar", H5T_NATIVE_INT, H5T_NATIVE_UCHAR,
H5T_conv_int_uchar)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uint_char", H5T_NATIVE_UINT, H5T_NATIVE_CHAR,
H5T_conv_uint_char)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uint_uchar", H5T_NATIVE_UINT, H5T_NATIVE_UCHAR,
H5T_conv_uint_uchar)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
/* From char */
if (H5Tregister_hard("char_llong", H5T_NATIVE_CHAR, H5T_NATIVE_LLONG,
H5T_conv_char_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("char_ullong", H5T_NATIVE_CHAR, H5T_NATIVE_ULLONG,
H5T_conv_char_ullong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uchar_llong", H5T_NATIVE_UCHAR, H5T_NATIVE_LLONG,
H5T_conv_uchar_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uchar_llong", H5T_NATIVE_UCHAR, H5T_NATIVE_LLONG,
H5T_conv_uchar_llong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("char_long", H5T_NATIVE_CHAR, H5T_NATIVE_LONG,
H5T_conv_char_long)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("char_ulong", H5T_NATIVE_CHAR, H5T_NATIVE_ULONG,
H5T_conv_char_ulong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uchar_long", H5T_NATIVE_UCHAR, H5T_NATIVE_LONG,
H5T_conv_uchar_long)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uchar_ulong", H5T_NATIVE_UCHAR, H5T_NATIVE_ULONG,
H5T_conv_uchar_ulong)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("char_short", H5T_NATIVE_CHAR, H5T_NATIVE_SHORT,
H5T_conv_char_short)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("char_ushort", H5T_NATIVE_CHAR, H5T_NATIVE_USHORT,
H5T_conv_char_ushort)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uchar_short", H5T_NATIVE_UCHAR, H5T_NATIVE_SHORT,
H5T_conv_uchar_short)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uchar_ushort", H5T_NATIVE_UCHAR, H5T_NATIVE_USHORT,
H5T_conv_uchar_ushort)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("char_int", H5T_NATIVE_CHAR, H5T_NATIVE_INT,
H5T_conv_char_int)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("char_uint", H5T_NATIVE_CHAR, H5T_NATIVE_UINT,
H5T_conv_char_uint)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uchar_int", H5T_NATIVE_UCHAR, H5T_NATIVE_INT,
H5T_conv_uchar_int)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uchar_uint", H5T_NATIVE_UCHAR, H5T_NATIVE_UINT,
H5T_conv_uchar_uint)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("char_uchar", H5T_NATIVE_CHAR, H5T_NATIVE_UCHAR,
H5T_conv_char_uchar)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
if (H5Tregister_hard("uchar_char", H5T_NATIVE_UCHAR, H5T_NATIVE_CHAR,
H5T_conv_uchar_char)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
FUNC_LEAVE(ret_value);
}
@ -772,7 +1242,7 @@ H5T_term_interface(void)
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
fprintf (H5DEBUG(T), "H5T: conversion function failed "
"to free private data\n");
"to free private data for %s\n", path->name);
}
#endif
H5E_clear(); /*ignore the error*/
@ -781,7 +1251,7 @@ H5T_term_interface(void)
if (H5DEBUG(T) && path->cdata.stats->ncalls>0) {
if (0==nprint++) {
HDfprintf (H5DEBUG(T), "H5T: type conversion statistics "
"accumulated over life of library:\n");
"accumulated over life of function:\n");
HDfprintf (H5DEBUG(T),
" %-16s %10s %10s %8s %8s %8s %10s\n",
"Conversion", "Elmts", "Calls", "User",
@ -863,6 +1333,7 @@ H5T_term_interface(void)
/* Unlock all datatypes, then free them */
H5I_search (H5I_DATATYPE, H5T_unlock_cb, NULL);
H5I_destroy_group(H5I_DATATYPE);
interface_initialize_g = FALSE;
}
@ -2961,6 +3432,8 @@ H5Tregister_hard(const char *name, hid_t src_id, hid_t dst_id,
H5T_t *dst = NULL;
H5T_path_t *path = NULL;
intn i;
hsize_t nbytes;
char bandwidth[32];
FUNC_ENTER(H5Tregister_hard, FAIL);
H5TRACE4("e","siix",name,src_id,dst_id,func);
@ -2977,12 +3450,57 @@ H5Tregister_hard(const char *name, hid_t src_id, hid_t dst_id,
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
if (!func && (path=H5T_path_find(NULL, src, dst, FALSE, NULL))) {
/* Free the private data for the function */
path->cdata.command = H5T_CONV_FREE;
if ((func)(FAIL, FAIL, &(path->cdata), 0, NULL, NULL)<0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
fprintf(H5DEBUG(T), "H5T: conversion function free failed "
"for %s\n", path->name);
}
#endif
H5E_clear(); /*ignore the failure*/
}
#ifdef H5T_DEBUG
/*
* Print statistics about the function we're removing because we
* won't get a chance to do it later.
*/
if (H5DEBUG(T) && path->cdata.stats->ncalls>0) {
HDfprintf(H5DEBUG(T), "H5T: conversion statistics accumulated "
"over life of function:\n");
nbytes = MAX(H5T_get_size(path->src), H5T_get_size(path->dst));
nbytes *= path->cdata.stats->nelmts;
H5_bandwidth(bandwidth, (double)nbytes,
path->cdata.stats->timer.etime);
HDfprintf(H5DEBUG(T),
" %-16s %10Hd %10d %8.2f %8.2f %8.2f %10s\n",
path->name,
path->cdata.stats->nelmts,
path->cdata.stats->ncalls,
path->cdata.stats->timer.utime,
path->cdata.stats->timer.stime,
path->cdata.stats->timer.etime,
bandwidth);
}
#endif
/* Clear the path */
path->name[0] = '\0';
path->func = NULL;
path->is_hard = FALSE;
path->cdata.stats = H5MM_xfree(path->cdata.stats);
}
/* Locate or create a new conversion path */
if (NULL == (path = H5T_path_find(name, src, dst, TRUE, func))) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to locate/allocate conversion path");
}
/*
* Notify all other functions to recalculate private data since some
* functions might cache a list of conversion functions. For instance,
@ -4469,6 +4987,8 @@ H5T_path_find(const char *name, const H5T_t *src, const H5T_t *dst,
H5T_path_t *path = NULL; /*path found */
int i;
hid_t src_id, dst_id;
hsize_t nbytes;
char bandwidth[32];
FUNC_ENTER(H5T_path_find, NULL);
@ -4477,115 +4997,169 @@ H5T_path_find(const char *name, const H5T_t *src, const H5T_t *dst,
assert(dst);
/* Binary search */
while (lt < rt) {
md = (lt + rt) / 2;
while (cmp && lt<rt) {
md = (lt+rt) / 2;
assert (H5T_path_g[md]);
cmp = H5T_cmp(src, H5T_path_g[md]->src);
if (0 == cmp) cmp = H5T_cmp(dst, H5T_path_g[md]->dst);
if (0==cmp) cmp = H5T_cmp(dst, H5T_path_g[md]->dst);
if (cmp < 0) {
if (cmp<0) {
rt = md;
} else if (cmp > 0) {
lt = md + 1;
} else {
HRETURN(H5T_path_g[md]);
} else if (cmp>0) {
lt = md+1;
}
}
/* Insert */
if (create) {
/* Return if the path is not found and we're not creating a new one */
if (cmp && !create) HRETURN(NULL);
/*
* If we found it then remember the path structure, otherwise create a
* new entry with a new path struct.
*/
if (!cmp) {
path = H5T_path_g[md];
} else {
if (H5T_npath_g >= H5T_apath_g) {
size_t na = MAX(64, 2 * H5T_apath_g);
size_t na = MAX(128, 2 * H5T_apath_g);
H5T_path_t **x = H5MM_realloc (H5T_path_g,
na*sizeof(H5T_path_t*));
na*sizeof(H5T_path_t*));
if (!x) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
H5T_apath_g = (intn)na;
H5T_path_g = x;
}
if (cmp > 0) md++;
/* make room */
HDmemmove(H5T_path_g + md + 1, H5T_path_g + md,
(H5T_npath_g - md) * sizeof(H5T_path_t*));
(H5T_npath_g - md) * sizeof(H5T_path_t*));
H5T_npath_g++;
/* insert */
if (NULL==(path=H5T_path_g[md]=H5MM_calloc (sizeof(H5T_path_t)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
"memory allocation failed");
}
path->src = H5T_copy(src, H5T_COPY_ALL);
path->dst = H5T_copy(dst, H5T_COPY_ALL);
/* Associate a function with the path if possible */
if (func) {
HDstrncpy (path->name, name, H5T_NAMELEN);
path->name[H5T_NAMELEN-1] = '\0';
path->func = func;
path->is_hard = TRUE;
path->cdata.command = H5T_CONV_INIT;
if (NULL==(path->cdata.stats=H5MM_calloc(sizeof(H5T_stats_t)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
if ((src_id=H5I_register(H5I_DATATYPE,
H5T_copy(path->src, H5T_COPY_ALL))) < 0 ||
(dst_id=H5I_register(H5I_DATATYPE,
H5T_copy(path->dst, H5T_COPY_ALL))) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register conv types for query");
}
if ((func)(src_id, dst_id, &(path->cdata), 0, NULL, NULL)<0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
fprintf (H5DEBUG(T), "H5T: conversion function init "
"failed\n");
}
#endif
H5E_clear(); /*ignore the failure*/
}
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
} else {
/* Locate a soft function */
for (i=H5T_nsoft_g-1; i>=0 && !path->func; --i) {
if (src->type!=H5T_soft_g[i].src ||
dst->type!=H5T_soft_g[i].dst) {
continue;
}
if ((src_id=H5I_register(H5I_DATATYPE,
H5T_copy(path->src,
H5T_COPY_ALL))) < 0 ||
(dst_id=H5I_register(H5I_DATATYPE,
H5T_copy(path->dst,
H5T_COPY_ALL))) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register conv types for query");
}
path->cdata.command = H5T_CONV_INIT;
path->cdata.stats = H5MM_calloc (sizeof(H5T_stats_t));
if (NULL==path->cdata.stats) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
if ((H5T_soft_g[i].func) (src_id, dst_id, &(path->cdata),
H5T_CONV_INIT, NULL, NULL) < 0) {
H5MM_xfree(path->cdata.stats);
HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear(); /*ignore the error*/
} else {
HDstrcpy (path->name, H5T_soft_g[i].name);
path->func = H5T_soft_g[i].func;
}
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
}
}
}
/*
* If a hard function is specified and the function doesn't match the one
* registered for the path then remove the one from the path.
*/
if (func && path->func && func!=path->func) {
/* Free the private data for the function */
path->cdata.command = H5T_CONV_FREE;
if ((func)(FAIL, FAIL, &(path->cdata), 0, NULL, NULL)<0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
fprintf(H5DEBUG(T), "H5T: conversion function free failed "
"for %s\n", path->name);
}
#endif
H5E_clear(); /*ignore the failure*/
}
#ifdef H5T_DEBUG
/*
* Print statistics about the function we're removing because we
* won't get a chance to do it later.
*/
if (H5DEBUG(T) && path->cdata.stats->ncalls>0) {
HDfprintf(H5DEBUG(T), "H5T: conversion statistics accumulated "
"over life of function:\n");
nbytes = MAX(H5T_get_size(path->src), H5T_get_size(path->dst));
nbytes *= path->cdata.stats->nelmts;
H5_bandwidth(bandwidth, (double)nbytes,
path->cdata.stats->timer.etime);
HDfprintf(H5DEBUG(T),
" %-16s %10Hd %10d %8.2f %8.2f %8.2f %10s\n",
path->name,
path->cdata.stats->nelmts,
path->cdata.stats->ncalls,
path->cdata.stats->timer.utime,
path->cdata.stats->timer.stime,
path->cdata.stats->timer.etime,
bandwidth);
}
#endif
/* Clear the path */
path->name[0] = '\0';
path->func = NULL;
path->is_hard = FALSE;
path->cdata.stats = H5MM_xfree(path->cdata.stats);
}
/* If a hard function is specified then add it to the path */
if (func) {
HDstrncpy(path->name, name && *name?name:"NONAME", H5T_NAMELEN);
path->name[H5T_NAMELEN-1] = '\0';
path->func = func;
path->is_hard = TRUE;
path->cdata.command = H5T_CONV_INIT;
if (NULL==(path->cdata.stats=H5MM_calloc(sizeof(H5T_stats_t)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
if ((src_id=H5I_register(H5I_DATATYPE,
H5T_copy(path->src, H5T_COPY_ALL)))<0 ||
(dst_id=H5I_register(H5I_DATATYPE,
H5T_copy(path->dst, H5T_COPY_ALL)))<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register conv types for query");
}
if ((func)(src_id, dst_id, &(path->cdata), 0, NULL, NULL)<0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
fprintf (H5DEBUG(T), "H5T: conversion function init failed "
"for %s\n", path->name);
}
#endif
H5E_clear(); /*ignore the failure*/
}
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
}
/*
* If the path doesn't have a function by now (because it's a new path
* and the caller didn't supply a hard function) then scan the soft list
* for an applicable function and add it to the path.
*/
for (i=H5T_nsoft_g-1; i>=0 && !path->func; --i) {
if (src->type!=H5T_soft_g[i].src ||
dst->type!=H5T_soft_g[i].dst) {
continue;
}
if ((src_id=H5I_register(H5I_DATATYPE,
H5T_copy(path->src, H5T_COPY_ALL)))<0 ||
(dst_id=H5I_register(H5I_DATATYPE,
H5T_copy(path->dst, H5T_COPY_ALL)))<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register conv types for query");
}
path->cdata.command = H5T_CONV_INIT;
path->cdata.stats = H5MM_calloc (sizeof(H5T_stats_t));
if (NULL==path->cdata.stats) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
if ((H5T_soft_g[i].func) (src_id, dst_id, &(path->cdata),
H5T_CONV_INIT, NULL, NULL)<0) {
H5MM_xfree(path->cdata.stats);
HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear(); /*ignore the error*/
} else {
HDstrcpy (path->name, H5T_soft_g[i].name);
path->func = H5T_soft_g[i].func;
}
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
}
FUNC_LEAVE(path);
}
@ -4704,7 +5278,7 @@ H5T_debug(H5T_t *dt, FILE * stream)
{
const char *s1="", *s2="";
int i, j;
uint64 tmp;
uint64_t tmp;
FUNC_ENTER(H5T_debug, FAIL);

View File

@ -131,6 +131,7 @@ H5TB_term_interface(void)
/* Reset head & tail pointers */
H5TB_list_head=H5TB_list_tail=NULL;
interface_initialize_g = FALSE;
}
/*-------------------------------------------------------------------------

View File

@ -36,7 +36,7 @@ static intn interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
void
H5T_bit_copy (uint8 *dst, size_t dst_offset, const uint8 *src,
H5T_bit_copy (uint8_t *dst, size_t dst_offset, const uint8_t *src,
size_t src_offset, size_t size)
{
intn shift;
@ -165,7 +165,7 @@ H5T_bit_copy (uint8 *dst, size_t dst_offset, const uint8 *src,
*-------------------------------------------------------------------------
*/
hsize_t
H5T_bit_get_d (uint8 *buf, size_t offset, size_t size)
H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size)
{
hsize_t val=0;
size_t i, hs;
@ -173,16 +173,16 @@ H5T_bit_get_d (uint8 *buf, size_t offset, size_t size)
FUNC_ENTER (H5T_bit_get_d, 0);
assert (8*sizeof(val)>=size);
H5T_bit_copy ((uint8*)&val, 0, buf, offset, size);
H5T_bit_copy ((uint8_t*)&val, 0, buf, offset, size);
switch (((H5T_t*)(H5I_object(H5T_NATIVE_INT_g)))->u.atomic.order) {
case H5T_ORDER_LE:
break;
case H5T_ORDER_BE:
for (i=0, hs=sizeof(val)/2; i<hs; i++) {
uint8 tmp = ((uint8*)&val)[i];
((uint8*)&val)[i] = ((uint8*)&val)[sizeof(val)-(i+1)];
((uint8*)&val)[sizeof(val)-(i+1)] = tmp;
uint8_t tmp = ((uint8_t*)&val)[i];
((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)];
((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp;
}
break;
@ -209,7 +209,7 @@ H5T_bit_get_d (uint8 *buf, size_t offset, size_t size)
*-------------------------------------------------------------------------
*/
void
H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val)
H5T_bit_set_d (uint8_t *buf, size_t offset, size_t size, hsize_t val)
{
size_t i, hs;
@ -221,9 +221,9 @@ H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val)
case H5T_ORDER_BE:
for (i=0, hs=sizeof(val)/2; i<hs; i++) {
uint8 tmp = ((uint8*)&val)[i];
((uint8*)&val)[i] = ((uint8*)&val)[sizeof(val)-(i+1)];
((uint8*)&val)[sizeof(val)-(i+1)] = tmp;
uint8_t tmp = ((uint8_t*)&val)[i];
((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)];
((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp;
}
break;
@ -231,7 +231,7 @@ H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val)
HDabort ();
}
H5T_bit_copy (buf, offset, (uint8*)&val, 0, size);
H5T_bit_copy (buf, offset, (uint8_t*)&val, 0, size);
}
@ -251,7 +251,7 @@ H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val)
*-------------------------------------------------------------------------
*/
void
H5T_bit_set (uint8 *buf, size_t offset, size_t size, hbool_t value)
H5T_bit_set (uint8_t *buf, size_t offset, size_t size, hbool_t value)
{
intn idx;
@ -309,7 +309,7 @@ H5T_bit_set (uint8 *buf, size_t offset, size_t size, hbool_t value)
*-------------------------------------------------------------------------
*/
ssize_t
H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
hbool_t value)
{
ssize_t base=(ssize_t)offset;
@ -415,7 +415,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
*-------------------------------------------------------------------------
*/
htri_t
H5T_bit_inc(uint8 *buf, size_t start, size_t size)
H5T_bit_inc(uint8_t *buf, size_t start, size_t size)
{
size_t idx = start / 8;
unsigned carry = 1;

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@ typedef struct H5T_atomic_t {
size_t sign; /*bit position of sign bit */
size_t epos; /*position of lsb of exponent */
size_t esize; /*size of exponent in bits */
uint64 ebias; /*exponent bias */
uint64_t ebias; /*exponent bias */
size_t mpos; /*position of lsb of mantissa */
size_t msize; /*size of mantissa */
H5T_norm_t norm; /*normalization */
@ -141,6 +141,10 @@ herr_t H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
herr_t H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *_buf, void *bkg);
herr_t H5T_conv_char_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uchar_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@ -149,7 +153,6 @@ herr_t H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@ -158,7 +161,6 @@ herr_t H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@ -167,6 +169,14 @@ herr_t H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
@ -176,7 +186,10 @@ herr_t H5T_conv_ushort_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@ -185,7 +198,6 @@ herr_t H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@ -194,6 +206,14 @@ herr_t H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
@ -203,7 +223,6 @@ herr_t H5T_conv_uint_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@ -212,7 +231,10 @@ herr_t H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@ -221,6 +243,14 @@ herr_t H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
@ -230,7 +260,6 @@ herr_t H5T_conv_ulong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@ -239,7 +268,6 @@ herr_t H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@ -248,22 +276,71 @@ herr_t H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_llong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ullong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *_buf, void *bkg);
/* Bit twiddling functions */
void H5T_bit_copy (uint8 *dst, size_t dst_offset, const uint8 *src,
void H5T_bit_copy (uint8_t *dst, size_t dst_offset, const uint8_t *src,
size_t src_offset, size_t size);
void H5T_bit_set (uint8 *buf, size_t offset, size_t size, hbool_t value);
hsize_t H5T_bit_get_d (uint8 *buf, size_t offset, size_t size);
void H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val);
ssize_t H5T_bit_find (uint8 *buf, size_t offset, size_t size,
void H5T_bit_set (uint8_t *buf, size_t offset, size_t size, hbool_t value);
hsize_t H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size);
void H5T_bit_set_d (uint8_t *buf, size_t offset, size_t size, hsize_t val);
ssize_t H5T_bit_find (uint8_t *buf, size_t offset, size_t size,
H5T_sdir_t direction, hbool_t value);
htri_t H5T_bit_inc(uint8 *buf, size_t start, size_t size);
htri_t H5T_bit_inc(uint8_t *buf, size_t start, size_t size);
#endif

View File

@ -42,7 +42,7 @@ typedef enum H5T_copy_t {
} H5T_copy_t;
/* Private functions */
herr_t H5T_init (void);
herr_t H5T_native_open(void);
herr_t H5T_init_interface (void);
htri_t H5T_isa(H5G_entry_t *ent);
H5T_t *H5T_open (H5G_entry_t *loc, const char *name);

View File

@ -209,8 +209,8 @@ extern hid_t H5T_IEEE_F64LE_g;
#define H5T_STD_B32LE (H5open(), H5T_STD_B32LE_g)
#define H5T_STD_B64BE (H5open(), H5T_STD_B64BE_g)
#define H5T_STD_B64LE (H5open(), H5T_STD_B64LE_g)
#define H5T_STD_REF_OBJ (H5open(), H5T_STD_REF_OBJ_g)
#define H5T_STD_REF_DSETREG (H5open(), H5T_STD_REF_DSETREG_g)
#define H5T_STD_REF_OBJ (H5open(), H5T_STD_REF_OBJ_g)
#define H5T_STD_REF_DSETREG (H5open(), H5T_STD_REF_DSETREG_g)
extern hid_t H5T_STD_I8BE_g;
extern hid_t H5T_STD_I8LE_g;
extern hid_t H5T_STD_I16BE_g;

View File

@ -251,8 +251,8 @@ H5V_hyper_disjointp(intn n,
if (!n || !size1 || !size2) return TRUE;
for (i=0; i<n; i++) {
assert (size1[i]<MAX_HSSIZET);
assert (size2[i]<MAX_HSSIZET);
assert (size1[i]<HSSIZET_MAX);
assert (size2[i]<HSSIZET_MAX);
if (0==size1[i] || 0==size2[i]) return TRUE;
if (((offset1?offset1[i]:0) < (offset2?offset2[i]:0) &&
@ -293,7 +293,7 @@ H5V_hyper_fill(intn n, const hsize_t *_size,
const hsize_t *total_size, const hssize_t *offset, void *_dst,
uintn fill_value)
{
uint8 *dst = (uint8 *) _dst; /*cast for ptr arithmetic */
uint8_t *dst = (uint8_t*)_dst; /*cast for ptr arithmetic */
hsize_t size[H5V_HYPER_NDIMS]; /*a modifiable copy of _size */
hssize_t dst_stride[H5V_HYPER_NDIMS]; /*destination stride info */
hsize_t dst_start; /*byte offset to start of stride*/
@ -374,8 +374,8 @@ H5V_hyper_copy(intn n, const hsize_t *_size,
const hsize_t *src_size, const hssize_t *src_offset,
const void *_src)
{
const uint8 *src = (const uint8 *)_src; /*cast for ptr arithmtc */
uint8 *dst = (uint8 *) _dst; /*cast for ptr arithmtc */
const uint8_t *src = (const uint8_t*)_src; /*cast for ptr arithmtc */
uint8_t *dst = (uint8_t*) _dst; /*cast for ptr arithmtc */
hsize_t size[H5V_HYPER_NDIMS]; /*a modifiable _size */
hssize_t src_stride[H5V_HYPER_NDIMS]; /*source stride info */
hssize_t dst_stride[H5V_HYPER_NDIMS]; /*dest stride info */
@ -469,7 +469,7 @@ herr_t
H5V_stride_fill(intn n, hsize_t elmt_size, const hsize_t *size,
const hssize_t *stride, void *_dst, uintn fill_value)
{
uint8 *dst = (uint8 *) _dst; /*cast for ptr arithmetic */
uint8_t *dst = (uint8_t*)_dst; /*cast for ptr arithmetic */
hsize_t idx[H5V_HYPER_NDIMS]; /*1-origin indices */
hsize_t nelmts; /*number of elements to fill */
hsize_t i; /*counter */
@ -477,7 +477,7 @@ H5V_stride_fill(intn n, hsize_t elmt_size, const hsize_t *size,
hbool_t carry; /*subtraction carray value */
FUNC_ENTER(H5V_stride_fill, FAIL);
assert (elmt_size < MAX_SIZET);
assert (elmt_size < SIZET_MAX);
H5V_vector_cpy(n, idx, size);
nelmts = H5V_vector_reduce_product(n, size);
@ -524,8 +524,8 @@ H5V_stride_copy(int n, hsize_t elmt_size, const hsize_t *size,
const hssize_t *dst_stride, void *_dst,
const hssize_t *src_stride, const void *_src)
{
uint8 *dst = (uint8 *) _dst; /*cast for ptr arithmetic*/
const uint8 *src = (const uint8 *) _src; /*cast for ptr arithmetic*/
uint8_t *dst = (uint8_t*)_dst; /*cast for ptr arithmetic*/
const uint8_t *src = (const uint8_t*) _src; /*cast for ptr arithmetic*/
hsize_t idx[H5V_HYPER_NDIMS]; /*1-origin indices */
hsize_t nelmts; /*num elements to copy */
hsize_t i; /*counter */
@ -533,7 +533,7 @@ H5V_stride_copy(int n, hsize_t elmt_size, const hsize_t *size,
hbool_t carry; /*carray for subtraction*/
FUNC_ENTER(H5V_stride_copy, FAIL);
assert (elmt_size<MAX_SIZET);
assert (elmt_size<SIZET_MAX);
if (n) {
H5V_vector_cpy(n, idx, size);
@ -591,8 +591,8 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
const hssize_t *src_stride,
const void *_src)
{
uint8 *dst = (uint8 *) _dst;
const uint8 *src = (const uint8 *) _src;
uint8_t *dst = (uint8_t *) _dst;
const uint8_t *src = (const uint8_t *) _src;
hsize_t dst_idx[H5V_HYPER_NDIMS];
hsize_t src_idx[H5V_HYPER_NDIMS];
hsize_t i;
@ -600,7 +600,7 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
hbool_t carry;
FUNC_ENTER(H5V_stride_copy2, FAIL);
assert (elmt_size < MAX_SIZET);
assert (elmt_size < SIZET_MAX);
H5V_vector_cpy(dst_n, dst_idx, dst_size);
H5V_vector_cpy(src_n, src_idx, src_size);
@ -645,16 +645,16 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
herr_t
H5V_array_fill(void *_dst, const void *src, size_t size, size_t count)
{
size_t copy_size; /* size of the buffer to copy */
size_t copy_items; /* number of items currently copying */
size_t items_left; /* number of items left to copy */
uint8 *dst=(uint8 *)_dst; /* alias for pointer arithmetic */
size_t copy_size; /* size of the buffer to copy */
size_t copy_items; /* number of items currently copying*/
size_t items_left; /* number of items left to copy */
uint8_t *dst=(uint8_t*)_dst;/* alias for pointer arithmetic */
FUNC_ENTER(H5V_array_fill, FAIL);
assert (dst);
assert (src);
assert (size < MAX_SIZET && size > 0);
assert (count < MAX_SIZET && count > 0);
assert (size < SIZET_MAX && size > 0);
assert (count < SIZET_MAX && count > 0);
HDmemcpy(dst, src, size); /* copy first item */

View File

@ -137,6 +137,7 @@ H5Z_term_interface (void)
}
H5Z_table_g = H5MM_xfree(H5Z_table_g);
H5Z_table_used_g = H5Z_table_alloc_g = 0;
interface_initialize_g = FALSE;
}
@ -501,7 +502,7 @@ H5Z_filter_deflate (uintn flags, size_t cd_nelmts, const uintn cd_values[],
size_t ret_value = 0;
int aggression = 6;
void *outbuf = NULL;
#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
#if defined(HAVE_COMPRESS2)
int status;
#endif
@ -514,7 +515,7 @@ H5Z_filter_deflate (uintn flags, size_t cd_nelmts, const uintn cd_values[],
}
aggression = cd_values[0];
#if defined(HAVE_LIBZ) && defined (HAVE_ZLIB_H)
#if defined(HAVE_COMPRESS2)
if (flags & H5Z_FLAG_REVERSE) {
/* Input; uncompress */
z_stream z_strm;

View File

@ -83,6 +83,18 @@
/* The number of bytes in a int. */
#undef SIZEOF_INT
/* The number of bytes in a int16_t. */
#undef SIZEOF_INT16_T
/* The number of bytes in a int32_t. */
#undef SIZEOF_INT32_T
/* The number of bytes in a int64_t. */
#undef SIZEOF_INT64_T
/* The number of bytes in a int8_t. */
#undef SIZEOF_INT8_T
/* The number of bytes in a long. */
#undef SIZEOF_LONG
@ -101,6 +113,18 @@
/* The number of bytes in a size_t. */
#undef SIZEOF_SIZE_T
/* The number of bytes in a uint16_t. */
#undef SIZEOF_UINT16_T
/* The number of bytes in a uint32_t. */
#undef SIZEOF_UINT32_T
/* The number of bytes in a uint64_t. */
#undef SIZEOF_UINT64_T
/* The number of bytes in a uint8_t. */
#undef SIZEOF_UINT8_T
/* Define if you have the BSDgettimeofday function. */
#undef HAVE_BSDGETTIMEOFDAY
@ -113,6 +137,9 @@
/* Define if you have the _scrsize function. */
#undef HAVE__SCRSIZE
/* Define if you have the compress2 function. */
#undef HAVE_COMPRESS2
/* Define if you have the difftime function. */
#undef HAVE_DIFFTIME
@ -200,5 +227,8 @@
/* Define if you have the mpio library (-lmpio). */
#undef HAVE_LIBMPIO
/* Define if you have the nsl library (-lnsl). */
#undef HAVE_LIBNSL
/* Define if you have the z library (-lz). */
#undef HAVE_LIBZ

View File

@ -357,18 +357,23 @@ static hbool_t interface_initialize_g = FALSE;\n\
#define INTERFACE_INIT NULL\n\
\n");
/* Function declaration */
/* The interface termination function */
printf("\n\
static void\n\
H5T_native_close(void)\n\
{\n\
interface_initialize_g = FALSE;\n\
}\n");
/* The interface initialization function */
printf("\n\
herr_t\n\
H5T_init (void)\n\
H5T_native_open (void)\n\
{\n\
H5T_t *dt = NULL;\n\
static intn ncalls = 0;\n\
\n\
FUNC_ENTER (H5T_init, FAIL);\n\
\n\
if (ncalls++) return SUCCEED; /*already initialized*/\n\
\n");
H5_add_exit(&H5T_native_close);\n");
for (i = 0; i < nd; i++) {

View File

@ -23,15 +23,14 @@
# include <errno.h>
# include <fcntl.h>
# include <float.h>
# include <limits.h>
# include <math.h>
# include <stdarg.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <limits.h>
#endif
/*
* If _POSIX_VERSION is defined in unistd.h then this system is Posix.1
* compliant. Otherwise all bets are off.
@ -186,12 +185,6 @@
# define SIGN(a) ((a)>0 ? 1 : (a)<0 ? -1 : 0)
#endif
/* maximum value of various types */
#define MAX_SIZET ((hsize_t)(size_t)(ssize_t)(-1))
#define MAX_SSIZET ((hsize_t)(ssize_t)((size_t)1<<(8*sizeof(ssize_t)-1)))
#define MAX_HSIZET ((hsize_t)(hssize_t)(-1))
#define MAX_HSSIZET ((hsize_t)1<<(8*sizeof(hssize_t)-1))
/*
* HDF Boolean type.
*/
@ -203,45 +196,80 @@
#endif
/*
* Numeric data types
* Numeric data types. Some of these might be defined in Posix.1g, otherwise
* we define them with the closest available type which is at least as large
* as the number of bits indicated in the type name.
*/
typedef char char8;
typedef signed char int8;
typedef unsigned char uchar8, uint8;
#if SIZEOF_SHORT==2
typedef short int16;
typedef unsigned short uint16;
#else
typedef int int16; /*not really */
typedef unsigned uint16; /*not really */
#if SIZEOF_INT8_T==0
typedef signed char int8_t;
#endif
#if SIZEOF_INT==4
typedef int int32;
typedef unsigned int uint32;
#elif SIZEOF_LONG==4
typedef long int32;
typedef unsigned long uint32;
#else
typedef int int32; /*not really */
typedef unsigned uint32; /*not really */
#if SIZEOF_UINT8_T==0
typedef unsigned char uint8_t;
#endif
#if SIZEOF_INT==8
typedef int int64;
typedef unsigned uint64;
#elif SIZEOF_LONG==8
typedef long int64;
typedef unsigned long uint64;
#elif SIZEOF_LONG_LONG==8
typedef long long int64;
typedef unsigned long long uint64;
#elif SIZEOF___INT64==8
typedef __int64 int64;
typedef unsigned __int64 uint64;
#else
# error "no 64-bit integer type"
#if SIZEOF_INT16_T==0
# if SIZEOF_SHORT==2
typedef short int16_t;
# else
typedef int int16_t; /*not really */
# endif
#endif
#if SIZEOF_UINT16_T==0
# if SIZEOF_SHORT==2
typedef unsigned short uint16_t;
# else
typedef unsigned uint16_t; /*not really */
# endif
#endif
#if SIZEOF_INT32_T==0
# if SIZEOF_INT==4
typedef int int32_t;
# elif SIZEOF_LONG==4
typedef long int32_t;
# else
typedef int int32_t; /*not really */
# endif
#endif
#if SIZEOF_UINT32_T==0
# if SIZEOF_INT==4
typedef unsigned int uint32_t;
# elif SIZEOF_LONG==4
typedef unsigned long uint32_t;
# else
typedef unsigned uint32_t; /*not really */
# endif
#endif
#if SIZEOF_INT64_T==0
# if SIZEOF_INT==8
typedef int int64_t;
# elif SIZEOF_LONG==8
typedef long int64_t;
# elif SIZEOF_LONG_LONG==8
typedef long long int64_t;
# elif SIZEOF___INT64==8
typedef __int64 int64_t;
# else
# error "no signed 64-bit integer type"
# endif
#endif
#if SIZEOF_UINT64_T==0
# if SIZEOF_INT==8
typedef unsigned uint64_t;
# elif SIZEOF_LONG==8
typedef unsigned long uint64_t;
# elif SIZEOF_LONG_LONG==8
typedef unsigned long long uint64_t;
# elif SIZEOF___INT64==8
typedef unsigned __int64 uint64_t;
# else
# error "no unsigned 64-bit integer type"
# endif
#endif
#if SIZEOF_FLOAT==4
@ -269,10 +297,26 @@ typedef unsigned uintn;
* File addresses.
*/
typedef struct {
uint64 offset; /*offset within an HDF5 file */
uint64_t offset; /*offset within an HDF5 file */
} haddr_t;
#define H5F_ADDR_UNDEF {((uint64)(-1L))}
#define H5F_ADDR_UNDEF {((uint64_t)(-1L))}
/*
* Maximum and minimum values. These should be defined in <limits.h> for the
* most part.
*/
#ifndef LLONG_MAX
# define LLONG_MAX ((long long)(((unsigned long long)1 \
<<(8*sizeof(long long)-1))-1))
# define ULLONG_MAX ((unsigned long long)((long long)(-1)))
#endif
#ifndef SIZET_MAX
# define SIZET_MAX ((hsize_t)(size_t)(ssize_t)(-1))
# define SSIZET_MAX ((hsize_t)(ssize_t)((size_t)1<<(8*sizeof(ssize_t)-1)))
#endif
#define HSIZET_MAX ((hsize_t)(hssize_t)(-1))
#define HSSIZET_MAX ((hsize_t)1<<(8*sizeof(hssize_t)-1))
/*
* Some compilers have problems declaring auto variables that point
@ -510,7 +554,7 @@ int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDstrtod(S,R) strtod(S,R)
#define HDstrtok(X,Y) strtok(X,Y)
#define HDstrtol(S,R,N) strtol(S,R,N)
int64 HDstrtoll (const char *s, const char **rest, int base);
int64_t HDstrtoll (const char *s, const char **rest, int base);
#define HDstrtoul(S,R,N) strtoul(S,R,N)
#define HDstrxfrm(X,Y,Z) strxfrm(X,Y,Z)
#define HDsysconf(N) sysconf(N)

View File

@ -36,7 +36,7 @@
#elif SIZEOF_LONG >= 8
#define GB8LL ((unsigned long)8*1024*1024*1024)
#else
#define GB8LL ((unsigned long)0) /* can not do the test */
#define GB8LL ((unsigned long)0) /* cannot do the test */
#endif
static hsize_t

View File

@ -34,7 +34,7 @@
static herr_t
test_find (void)
{
uint8 v1[8];
uint8_t v1[8];
intn i;
ssize_t n;
@ -154,7 +154,7 @@ test_find (void)
static herr_t
test_copy (void)
{
uint8 v1[8], v2[8];
uint8_t v1[8], v2[8];
size_t s_offset, d_offset, size;
intn i, j;
ssize_t n;
@ -277,7 +277,7 @@ test_copy (void)
static herr_t
test_set (void)
{
uint8 v2[8];
uint8_t v2[8];
size_t d_offset, size;
intn i, j;
ssize_t n;
@ -395,7 +395,7 @@ test_set (void)
static herr_t
test_clear (void)
{
uint8 v2[8];
uint8_t v2[8];
size_t d_offset, size;
intn i, j;
ssize_t n;

File diff suppressed because it is too large Load Diff

View File

@ -86,8 +86,8 @@ test_1 (void)
{
H5F_t *f;
H5HG_t obj[1024];
uint8 out[1024];
uint8 in[1024];
uint8_t out[1024];
uint8_t in[1024];
int i;
size_t size;
herr_t status;
@ -169,8 +169,8 @@ test_2 (void)
{
H5F_t *f;
H5HG_t obj[1024];
uint8 out[1024];
uint8 in[1024];
uint8_t out[1024];
uint8_t in[1024];
int i;
size_t size;
herr_t status;
@ -247,7 +247,7 @@ test_3 (void)
{
H5F_t *f;
H5HG_t obj[1024];
uint8 out[1024];
uint8_t out[1024];
int i;
size_t size;
herr_t status;
@ -316,7 +316,7 @@ test_4 (void)
{
H5F_t *f;
H5HG_t obj[1024];
uint8 out[1024];
uint8_t out[1024];
int i;
size_t size;
herr_t status;

View File

@ -43,10 +43,10 @@
*-------------------------------------------------------------------------
*/
static uintn
init_full(uint8 *array, size_t nx, size_t ny, size_t nz)
init_full(uint8_t *array, size_t nx, size_t ny, size_t nz)
{
size_t i, j, k;
uint8 acc = 128;
uint8_t acc = 128;
uintn total = 0;
for (i=0; i<nx; i++) {
@ -75,7 +75,7 @@ init_full(uint8 *array, size_t nx, size_t ny, size_t nz)
*-------------------------------------------------------------------------
*/
static void
print_array(uint8 *array, size_t nx, size_t ny, size_t nz)
print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
{
size_t i, j, k;
@ -118,9 +118,9 @@ print_array(uint8 *array, size_t nx, size_t ny, size_t nz)
static void
print_ref(size_t nx, size_t ny, size_t nz)
{
uint8 *array;
uint8_t *array;
array = H5MM_calloc(nx*ny*nz*sizeof(uint8));
array = H5MM_calloc(nx*ny*nz*sizeof(uint8_t));
printf("Reference array:\n");
init_full(array, nx, ny, nz);
@ -148,7 +148,7 @@ test_fill(size_t nx, size_t ny, size_t nz,
size_t di, size_t dj, size_t dk,
size_t ddx, size_t ddy, size_t ddz)
{
uint8 *dst = NULL; /*destination array */
uint8_t *dst = NULL; /*destination array */
hsize_t hs_size[3]; /*hyperslab size */
hsize_t dst_size[3]; /*destination total size */
hssize_t dst_offset[3]; /*offset of hyperslab in dest */
@ -312,8 +312,8 @@ test_copy(int mode,
size_t di, size_t dj, size_t dk,
size_t ddx, size_t ddy, size_t ddz)
{
uint8 *src = NULL; /*source array */
uint8 *dst = NULL; /*destination array */
uint8_t *src = NULL; /*source array */
uint8_t *dst = NULL; /*destination array */
hsize_t hs_size[3]; /*hyperslab size */
hsize_t dst_size[3]; /*destination total size */
hsize_t src_size[3]; /*source total size */
@ -650,13 +650,13 @@ test_multifill(size_t nx)
printf(" fill={%d,%g,%d}\n ",
fill.left, fill.mid, fill.right);
for (j = 0; j < sizeof(fill); j++) {
printf(" %02x", ((uint8 *) &fill)[j]);
printf(" %02x", ((uint8_t *) &fill)[j]);
}
printf("\n dst[%lu]={%d,%g,%d}\n ",
(unsigned long)i,
dst[i].left, dst[i].mid, dst[i].right);
for (j = 0; j < sizeof(dst[i]); j++) {
printf(" %02x", ((uint8 *) (dst + i))[j]);
printf(" %02x", ((uint8_t *) (dst + i))[j]);
}
printf("\n");
}
@ -696,8 +696,8 @@ test_multifill(size_t nx)
static herr_t
test_endian(size_t nx)
{
uint8 *src = NULL; /*source array */
uint8 *dst = NULL; /*destination array */
uint8_t *src = NULL; /*source array */
uint8_t *dst = NULL; /*destination array */
hssize_t src_stride[2]; /*source strides */
hssize_t dst_stride[2]; /*destination strides */
hsize_t size[2]; /*size vector */
@ -880,9 +880,9 @@ test_transpose(size_t nx, size_t ny)
static herr_t
test_sub_super(size_t nx, size_t ny)
{
uint8 *full = NULL; /*original image */
uint8 *half = NULL; /*image at 1/2 resolution */
uint8 *twice = NULL; /*2x2 pixels */
uint8_t *full = NULL; /*original image */
uint8_t *half = NULL; /*image at 1/2 resolution */
uint8_t *twice = NULL; /*2x2 pixels */
hssize_t src_stride[4]; /*source stride info */
hssize_t dst_stride[4]; /*destination stride info */
hsize_t size[4]; /*number of sample points */
@ -910,7 +910,7 @@ test_sub_super(size_t nx, size_t ny)
dst_stride[1] = 1;
/* Copy */
H5V_stride_copy(2, (hsize_t)sizeof(uint8), size,
H5V_stride_copy(2, (hsize_t)sizeof(uint8_t), size,
dst_stride, half, src_stride, full);
/* Check */
@ -956,12 +956,12 @@ test_sub_super(size_t nx, size_t ny)
src_stride[2] = 0;
src_stride[3] = 0;
dst_stride[0] = (ssize_t)(2 * ny);
dst_stride[1] = (ssize_t)(2 * sizeof(uint8) - 4 * ny);
dst_stride[2] = (ssize_t)(2 * ny - 2 * sizeof(uint8));
dst_stride[3] = sizeof(uint8);
dst_stride[1] = (ssize_t)(2 * sizeof(uint8_t) - 4 * ny);
dst_stride[2] = (ssize_t)(2 * ny - 2 * sizeof(uint8_t));
dst_stride[3] = sizeof(uint8_t);
/* Copy */
H5V_stride_copy(4, (hsize_t)sizeof(uint8), size,
H5V_stride_copy(4, (hsize_t)sizeof(uint8_t), size,
dst_stride, twice, src_stride, half);
/* Check */

View File

@ -59,7 +59,7 @@ hssize_t zero[H5O_LAYOUT_NDIMS];
*-------------------------------------------------------------------------
*/
static void
print_array(uint8 *array, size_t nx, size_t ny, size_t nz)
print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
{
size_t i, j, k;
@ -210,7 +210,7 @@ test_extend(H5F_t *f, const char *prefix,
H5G_entry_t handle;
hsize_t i, j, k, ctr;
int ndims;
uint8 *buf = NULL, *check = NULL, *whole = NULL;
uint8_t *buf = NULL, *check = NULL, *whole = NULL;
char dims[64], s[256], name[256];
hssize_t offset[3];
hssize_t max_corner[3];
@ -441,7 +441,7 @@ test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
hsize_t size[3], total = 0;
H5G_entry_t handle;
H5O_layout_t layout;
uint8 *buf = NULL;
uint8_t *buf = NULL;
if (!nz) {
if (!ny) {
@ -617,8 +617,8 @@ main(int argc, char *argv[])
/* Create the test file */
if (NULL == (f = H5F_open(FILENAME,
(H5F_ACC_CREAT | H5F_ACC_RDWR | H5F_ACC_TRUNC |
H5F_ACC_DEBUG),
(H5F_ACC_CREAT | H5F_ACC_RDWR | H5F_ACC_TRUNC |
H5F_ACC_DEBUG),
creation_template, NULL))) {
printf("Cannot create file %s; test aborted\n", FILENAME);
exit(1);

View File

@ -34,21 +34,21 @@ static char RcsId[] = "$Revision$";
#define TEST_INT32_VALUE -981236
#define TEST_UINT32_VALUE 3476589
uint8 compar_buffer[] =
uint8_t compar_buffer[] =
{
/* Little-endian encoded version of the 16-bit signed integer */
(uint8) ((TEST_INT16_VALUE) & 0xff), (uint8) ((TEST_INT16_VALUE >> 8) & 0xff),
(uint8_t) ((TEST_INT16_VALUE) & 0xff), (uint8_t) ((TEST_INT16_VALUE >> 8) & 0xff),
/* Little-endian encoded version of the 16-bit unsigned integer */
(uint8) ((TEST_UINT16_VALUE) & 0xff), (uint8) ((TEST_UINT16_VALUE >> 8) & 0xff),
(uint8_t) ((TEST_UINT16_VALUE) & 0xff), (uint8_t) ((TEST_UINT16_VALUE >> 8) & 0xff),
/* Little-endian encoded version of the 32-bit signed integer */
(uint8) ((TEST_INT32_VALUE) & 0xff), (uint8) ((TEST_INT32_VALUE >> 8) & 0xff),
(uint8) ((TEST_INT32_VALUE >> 16) & 0xff), (uint8) ((TEST_INT32_VALUE >> 24) & 0xff),
(uint8_t) ((TEST_INT32_VALUE) & 0xff), (uint8_t) ((TEST_INT32_VALUE >> 8) & 0xff),
(uint8_t) ((TEST_INT32_VALUE >> 16) & 0xff), (uint8_t) ((TEST_INT32_VALUE >> 24) & 0xff),
/* Little-endian encoded version of the 32-bit unsigned integer */
(uint8) ((TEST_UINT32_VALUE) & 0xff), (uint8) ((TEST_UINT32_VALUE >> 8) & 0xff),
(uint8) ((TEST_UINT32_VALUE >> 16) & 0xff), (uint8) ((TEST_UINT32_VALUE >> 24) & 0xff),
(uint8_t) ((TEST_UINT32_VALUE) & 0xff), (uint8_t) ((TEST_UINT32_VALUE >> 8) & 0xff),
(uint8_t) ((TEST_UINT32_VALUE >> 16) & 0xff), (uint8_t) ((TEST_UINT32_VALUE >> 24) & 0xff),
};
uint8 encode_buffer[sizeof(compar_buffer)];
uint8_t encode_buffer[sizeof(compar_buffer)];
/****************************************************************
**
@ -58,15 +58,15 @@ uint8 encode_buffer[sizeof(compar_buffer)];
void
test_metadata(void)
{
int16 ei16 = TEST_INT16_VALUE; /* variables to hold the values to encode */
uint16 eu16 = TEST_UINT16_VALUE;
int32 ei32 = TEST_INT32_VALUE;
uint32 eu32 = TEST_UINT32_VALUE;
int16 di16; /* variables to hold the decoded values */
uint16 du16;
int32 di32;
uint32 du32;
uint8 *p; /* pointer into the buffer being en/de-coded */
int16_t ei16 = TEST_INT16_VALUE; /* variables to hold the values to encode */
uint16_t eu16 = TEST_UINT16_VALUE;
int32_t ei32 = TEST_INT32_VALUE;
uint32_t eu32 = TEST_UINT32_VALUE;
int16_t di16; /* variables to hold the decoded values */
uint16_t du16;
int32_t di32;
uint32_t du32;
uint8_t *p; /* pointer into the buffer being en/de-coded */
/* Output message about test being performed */
MESSAGE(5, ("Testing Metadata encode/decode code\n"));

View File

@ -62,7 +62,7 @@ test_reference_obj(void)
hobj_ref_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temp. buffer read from disk */
uint32 *tu32; /* Temporary pointer to uint32 data */
uint32_t *tu32; /* Temporary pointer to uint32 data */
intn i; /* counting variables */
herr_t ret; /* Generic return value */
@ -94,7 +94,7 @@ test_reference_obj(void)
dataset=H5Dcreate(fid1,"Dataset1",H5T_STD_U32LE,sid1,H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate");
for(tu32=(uint32 *)wbuf,i=0; i<SPACE1_DIM1; i++)
for(tu32=(uint32_t *)wbuf,i=0; i<SPACE1_DIM1; i++)
*tu32++=i*3;
/* Write selection to disk */
@ -170,8 +170,8 @@ test_reference_obj(void)
ret=H5Dread(dset2,H5T_STD_U32LE,H5S_ALL,H5S_ALL,H5P_DEFAULT,tbuf);
CHECK(ret, FAIL, "H5Dread");
for(tu32=(uint32 *)tbuf,i=0; i<SPACE1_DIM1; i++,tu32++)
VERIFY(*tu32, (uint32)(i*3), "Data");
for(tu32=(uint32_t *)tbuf,i=0; i<SPACE1_DIM1; i++,tu32++)
VERIFY(*tu32, (uint32_t)(i*3), "Data");
/* Close dereferenced Dataset */
ret = H5Dclose(dset2);
@ -215,9 +215,9 @@ test_reference_region(void)
hssize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hdset_reg_ref_t *wbuf, /* buffer to write to disk */
*rbuf; /* buffer read from disk */
uint8 *dwbuf, /* Buffer for writing numeric data to disk */
uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
*drbuf; /* Buffer for reading numeric data from disk */
uint8 *tu8; /* Temporary pointer to uint8 data */
uint8_t *tu8; /* Temporary pointer to uint8 data */
intn i; /* counting variables */
herr_t ret; /* Generic return value */
@ -227,8 +227,8 @@ test_reference_region(void)
/* Allocate write & read buffers */
wbuf=malloc(sizeof(hdset_reg_ref_t)*SPACE1_DIM1);
rbuf=malloc(sizeof(hdset_reg_ref_t)*SPACE1_DIM1);
dwbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
drbuf=calloc(sizeof(uint8),SPACE2_DIM1*SPACE2_DIM2);
dwbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
drbuf=calloc(sizeof(uint8_t),SPACE2_DIM1*SPACE2_DIM2);
/* Create file */
fid1 = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

View File

@ -81,7 +81,7 @@ test_select_hyper(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
uint8 *wbuf, /* buffer to write to disk */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@ -93,13 +93,13 @@ test_select_hyper(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint8)((i*SPACE2_DIM2)+j);
*tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -211,7 +211,7 @@ test_select_point(void)
hssize_t coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
hssize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hssize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
uint8 *wbuf, /* buffer to write to disk */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@ -222,13 +222,13 @@ test_select_point(void)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint8)((i*SPACE2_DIM2)+j);
*tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -352,7 +352,7 @@ test_select_all(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
uint8 *wbuf, /* buffer to write to disk */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@ -364,13 +364,13 @@ test_select_all(void)
MESSAGE(5, ("Testing 'All' Selection Functions\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint8)((i*SPACE2_DIM2)+j);
*tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -492,7 +492,7 @@ test_select_combo(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
uint8 *wbuf, /* buffer to write to disk */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@ -503,13 +503,13 @@ test_select_combo(void)
MESSAGE(5, ("Testing Combination of Hyperslab & Element Selection Functions\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint8)((i*SPACE2_DIM2)+j);
*tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -633,7 +633,7 @@ test_select_hyper_stride(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
uint16 *wbuf, /* buffer to write to disk */
uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@ -668,13 +668,13 @@ test_select_hyper_stride(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint16)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint16_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint16)((i*SPACE2_DIM2)+j);
*tbuf++=(uint16_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -787,7 +787,7 @@ test_select_hyper_copy(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
uint16 *wbuf, /* buffer to write to disk */
uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* 1st buffer read from disk */
*rbuf2, /* 2nd buffer read from disk */
*tbuf; /* temporary buffer pointer */
@ -798,14 +798,14 @@ test_select_hyper_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint16)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
rbuf2=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint16_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
rbuf2=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint16)((i*SPACE2_DIM2)+j);
*tbuf++=(uint16_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -886,7 +886,7 @@ test_select_hyper_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
if(HDmemcmp(rbuf,rbuf2,sizeof(uint16)*SPACE3_DIM1*SPACE3_DIM2)) {
if(HDmemcmp(rbuf,rbuf2,sizeof(uint16_t)*SPACE3_DIM1*SPACE3_DIM2)) {
printf("hyperslab values don't match!\n");
} /* end if */
@ -938,7 +938,7 @@ test_select_point_copy(void)
hssize_t coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
hssize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hssize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
uint16 *wbuf, /* buffer to write to disk */
uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* 1st buffer read from disk */
*rbuf2, /* 2nd buffer read from disk */
*tbuf; /* temporary buffer pointer */
@ -949,14 +949,14 @@ test_select_point_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint16)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
rbuf2=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint16_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
rbuf2=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint16)((i*SPACE2_DIM2)+j);
*tbuf++=(uint16_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -1055,7 +1055,7 @@ test_select_point_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
if(HDmemcmp(rbuf,rbuf2,sizeof(uint16)*SPACE3_DIM1*SPACE3_DIM2)) {
if(HDmemcmp(rbuf,rbuf2,sizeof(uint16_t)*SPACE3_DIM1*SPACE3_DIM2)) {
printf("hyperslab values don't match!\n");
} /* end if */
@ -1110,7 +1110,7 @@ test_select_hyper_offset(void)
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
hssize_t offset[SPACE1_RANK]; /* Offset of selection */
uint8 *wbuf, /* buffer to write to disk */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@ -1123,13 +1123,13 @@ test_select_hyper_offset(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with Offsets\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint8)((i*SPACE2_DIM2)+j);
*tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -1270,7 +1270,7 @@ test_select_point_offset(void)
hssize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hssize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
hssize_t offset[SPACE1_RANK]; /* Offset of selection */
uint8 *wbuf, /* buffer to write to disk */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@ -1282,13 +1282,13 @@ test_select_point_offset(void)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint8)((i*SPACE2_DIM2)+j);
*tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -1448,7 +1448,7 @@ test_select_hyper_union(void)
{10,10,10,10,10,10,10,10, /* First eight rows are 10 long */
20,20, /* Next two rows are 20 long */
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15}; /* Next eighteen rows are 15 long */
uint8 *wbuf, /* buffer to write to disk */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@ -1460,13 +1460,13 @@ test_select_hyper_union(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of hyperslabs\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
*tbuf++=(uint8)((i*SPACE2_DIM2)+j);
*tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -2011,7 +2011,7 @@ test_select_hyper_union_3d(void)
{7,4,2,8},
{7,5,2,8},
{7,6,2,8}};
uint8 *wbuf, /* buffer to write to disk */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@ -2023,14 +2023,14 @@ test_select_hyper_union_3d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of 3-D hyperslabs\n"));
/* Allocate write & read buffers */
wbuf=malloc(sizeof(uint8)*SPACE4_DIM1*SPACE4_DIM2*SPACE4_DIM3);
rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
wbuf=malloc(sizeof(uint8_t)*SPACE4_DIM1*SPACE4_DIM2*SPACE4_DIM3);
rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE4_DIM1; i++)
for(j=0; j<SPACE4_DIM2; j++)
for(k=0; k<SPACE4_DIM3; k++)
*tbuf++=(uint8)((((i*SPACE4_DIM2)+j)*SPACE4_DIM3)+k);
*tbuf++=(uint8_t)((((i*SPACE4_DIM2)+j)*SPACE4_DIM3)+k);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

View File

@ -48,13 +48,13 @@
int
main(int argc, char *argv[])
{
hid_t fid, plist=H5P_DEFAULT;
H5F_t *f;
haddr_t addr;
uint8 sig[16];
intn i, ndims;
herr_t status = SUCCEED;
haddr_t extra;
hid_t fid, plist=H5P_DEFAULT;
H5F_t *f;
haddr_t addr;
uint8_t sig[16];
intn i, ndims;
herr_t status = SUCCEED;
haddr_t extra;
/*
* Open the file and get the file descriptor.
@ -90,7 +90,7 @@ main(int argc, char *argv[])
printf("Reading signature at address ");
H5F_addr_print(stdout, &addr);
printf(" (rel)\n");
if (H5F_block_read(f, &addr, (hsize_t)sizeof(sig), H5D_XFER_DFLT, sig) < 0) {
if (H5F_block_read(f, &addr, (hsize_t)sizeof(sig), H5D_XFER_DFLT, sig)<0) {
fprintf(stderr, "cannot read signature\n");
HDexit(3);
}
@ -137,7 +137,8 @@ main(int argc, char *argv[])
break;
default:
fprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned) (subtype));
fprintf(stderr, "Unknown B-tree subtype %u\n",
(unsigned)(subtype));
HDexit(4);
}

View File

@ -257,7 +257,7 @@ h5dump_sprint(char *s/*out*/, const h5dump_t *info, hid_t type, void *vp)
strcpy(fmt, "%");
strcat(fmt, PRINTF_LL_WIDTH);
strcat(fmt, "d");
sprintf(temp, fmt, *((int64*)vp));
sprintf(temp, fmt, *((int64_t*)vp));
}
} else if (H5Tequal(type, H5T_NATIVE_HSIZE)) {
@ -270,7 +270,7 @@ h5dump_sprint(char *s/*out*/, const h5dump_t *info, hid_t type, void *vp)
strcpy(fmt, "%");
strcat(fmt, PRINTF_LL_WIDTH);
strcat(fmt, "u");
sprintf(temp, fmt, *((uint64*)vp));
sprintf(temp, fmt, *((uint64_t*)vp));
}
} else if (H5T_COMPOUND==H5Tget_class(type)) {