summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/.distdep26
-rw-r--r--src/H5.c18
-rw-r--r--src/H5A.c7
-rw-r--r--src/H5B.c42
-rw-r--r--src/H5Bprivate.h10
-rw-r--r--src/H5D.c13
-rw-r--r--src/H5Distore.c28
-rw-r--r--src/H5F.c29
-rw-r--r--src/H5Farray.c10
-rw-r--r--src/H5Fcore.c10
-rw-r--r--src/H5Ffamily.c10
-rw-r--r--src/H5Fistore.c28
-rw-r--r--src/H5Flow.c20
-rw-r--r--src/H5Fmpio.c14
-rw-r--r--src/H5Fprivate.h128
-rw-r--r--src/H5Fsec2.c18
-rw-r--r--src/H5Fsplit.c8
-rw-r--r--src/H5Fstdio.c32
-rw-r--r--src/H5G.c1
-rw-r--r--src/H5Gent.c14
-rw-r--r--src/H5Gnode.c14
-rw-r--r--src/H5Gpkg.h4
-rw-r--r--src/H5Gprivate.h4
-rw-r--r--src/H5HG.c18
-rw-r--r--src/H5HL.c12
-rw-r--r--src/H5I.c3
-rw-r--r--src/H5O.c16
-rw-r--r--src/H5Oattr.c10
-rw-r--r--src/H5Ocomp.c8
-rw-r--r--src/H5Ocont.c8
-rw-r--r--src/H5Odtype.c20
-rw-r--r--src/H5Oefl.c16
-rw-r--r--src/H5Ofill.c8
-rw-r--r--src/H5Olayout.c8
-rw-r--r--src/H5Omtime.c8
-rw-r--r--src/H5Oname.c8
-rw-r--r--src/H5Oprivate.h14
-rw-r--r--src/H5Osdspace.c8
-rw-r--r--src/H5Oshared.c8
-rw-r--r--src/H5Ostab.c8
-rw-r--r--src/H5P.c1
-rw-r--r--src/H5R.c17
-rw-r--r--src/H5RA.c7
-rw-r--r--src/H5S.c3
-rw-r--r--src/H5Sall.c22
-rw-r--r--src/H5Shyper.c30
-rw-r--r--src/H5Snone.c10
-rw-r--r--src/H5Spoint.c36
-rw-r--r--src/H5Sprivate.h14
-rw-r--r--src/H5Sselect.c2
-rw-r--r--src/H5T.c750
-rw-r--r--src/H5TB.c1
-rw-r--r--src/H5Tbit.c28
-rw-r--r--src/H5Tconv.c1314
-rw-r--r--src/H5Tpkg.h107
-rw-r--r--src/H5Tprivate.h2
-rw-r--r--src/H5Tpublic.h4
-rw-r--r--src/H5V.c38
-rw-r--r--src/H5Z.c5
-rw-r--r--src/H5config.h.in30
-rw-r--r--src/H5detect.c17
-rw-r--r--src/H5private.h136
62 files changed, 2614 insertions, 629 deletions
diff --git a/src/.distdep b/src/.distdep
index 24cf35b..4dfd2fb 100644
--- a/src/.distdep
+++ b/src/.distdep
@@ -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 \
diff --git a/src/H5.c b/src/H5.c
index 06c164c..47a0024 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -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;
}
diff --git a/src/H5A.c b/src/H5A.c
index 5e9cacf..89ee492 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -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");
diff --git a/src/H5B.c b/src/H5B.c
index 32fb141..8b45638 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -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 */
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index da89026..3fd21b6 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -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;
diff --git a/src/H5D.c b/src/H5D.c
index 4162c34..15c0956 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -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;
diff --git a/src/H5Distore.c b/src/H5Distore.c
index c30a24f..92c0dd3 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -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
diff --git a/src/H5F.c b/src/H5F.c
index 38f17e9..39e9bb3 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -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");
diff --git a/src/H5Farray.c b/src/H5Farray.c
index 0c77bb5..38f3f07 100644
--- a/src/H5Farray.c
+++ b/src/H5Farray.c
@@ -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 */
diff --git a/src/H5Fcore.c b/src/H5Fcore.c
index d67eebd..557aed2 100644
--- a/src/H5Fcore.c
+++ b/src/H5Fcore.c
@@ -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);
diff --git a/src/H5Ffamily.c b/src/H5Ffamily.c
index 79a9314..d9fb032 100644
--- a/src/H5Ffamily.c
+++ b/src/H5Ffamily.c
@@ -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;
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index c30a24f..92c0dd3 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -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
diff --git a/src/H5Flow.c b/src/H5Flow.c
index 7add2f9..3bed7f0 100644
--- a/src/H5Flow.c
+++ b/src/H5Flow.c
@@ -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);
}
diff --git a/src/H5Fmpio.c b/src/H5Fmpio.c
index 74981fe..dc67fba 100644
--- a/src/H5Fmpio.c
+++ b/src/H5Fmpio.c
@@ -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;
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 173e4c5..2efea45 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -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);
diff --git a/src/H5Fsec2.c b/src/H5Fsec2.c
index 172ec1c..97ecaeb 100644
--- a/src/H5Fsec2.c
+++ b/src/H5Fsec2.c
@@ -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) {
diff --git a/src/H5Fsplit.c b/src/H5Fsplit.c
index 1b3eb8e..7655054 100644
--- a/src/H5Fsplit.c
+++ b/src/H5Fsplit.c
@@ -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;
diff --git a/src/H5Fstdio.c b/src/H5Fstdio.c
index ae31305..eff325f 100644
--- a/src/H5Fstdio.c
+++ b/src/H5Fstdio.c
@@ -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);
}
diff --git a/src/H5G.c b/src/H5G.c
index 74fd26e..71f2e77 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -731,6 +731,7 @@ H5G_term_interface(void)
/* Destroy the group object id group */
H5I_destroy_group(H5I_GROUP);
+ interface_initialize_g = FALSE;
}
diff --git a/src/H5Gent.c b/src/H5Gent.c
index bc93735..70421ca 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -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);
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 1107e56..b7810c0 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -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);
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index 03a2629..2584eb0 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -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
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index ac430c1..598aa33 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -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.
diff --git a/src/H5HG.c b/src/H5HG.c
index 2cf3c25..c72f47d 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -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);
diff --git a/src/H5HL.c b/src/H5HL.c
index d85ed30..edc267f 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -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);
diff --git a/src/H5I.c b/src/H5I.c
index 13df5e5..dfceb41 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -941,4 +941,7 @@ H5I_term_interface(void)
id_group_list[i] = NULL;
}
}
+
+ /* Indicate interface closed */
+ interface_initialize_g = FALSE;
}
diff --git a/src/H5O.c b/src/H5O.c
index d1e1d07..e2de522 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -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);
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 32e9252..afdd533 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -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 */
diff --git a/src/H5Ocomp.c b/src/H5Ocomp.c
index a7e1969..90fd622 100644
--- a/src/H5Ocomp.c
+++ b/src/H5Ocomp.c
@@ -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;
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index d864322..3ba9b24 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -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;
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index e68d352..2ccdfec 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -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;
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 5c1249c..f812c3f 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -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 */
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 4e680f9..6d77bb8 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -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;
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 4d57cc3..363277c 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -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;
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index f634184..86e19b8 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -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;
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 00527d6..50ae81e 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -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;
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 16fbded..3bccafc 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -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);
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 74634cc..4dfaaa5 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -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 */
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index c9cca9c..ba3971f 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -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;
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 80beed5..9f48c9d 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -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;
diff --git a/src/H5P.c b/src/H5P.c
index 164ef19..f529128 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -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;
}
/*--------------------------------------------------------------------------
diff --git a/src/H5R.c b/src/H5R.c
index 9a25a06..209de7f 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -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) {
diff --git a/src/H5RA.c b/src/H5RA.c
index 1f05424..d9eb0b5 100644
--- a/src/H5RA.c
+++ b/src/H5RA.c
@@ -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 */
diff --git a/src/H5S.c b/src/H5S.c
index 61359e4..9675eae 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -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];
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 9ac5940..8904339 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -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;
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 03f364c..a3fef1e 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -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;
diff --git a/src/H5Snone.c b/src/H5Snone.c
index cbb3d1e..6721d98 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -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;
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 66f6b8b..e52eb14 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -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;
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index 817d654..3e593f6 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -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 */
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 7564680..f5db9ad 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -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 */
diff --git a/src/H5T.c b/src/H5T.c
index 6249208..2dc75d9 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -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) {
+ /*
+ * 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 init "
- "failed\n");
- }
+ if (H5DEBUG(T)) {
+ fprintf(H5DEBUG(T), "H5T: conversion function free failed "
+ "for %s\n", path->name);
+ }
#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);
- }
- }
+ 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);
diff --git a/src/H5TB.c b/src/H5TB.c
index ff5147d..de6473c 100644
--- a/src/H5TB.c
+++ b/src/H5TB.c
@@ -131,6 +131,7 @@ H5TB_term_interface(void)
/* Reset head & tail pointers */
H5TB_list_head=H5TB_list_tail=NULL;
+ interface_initialize_g = FALSE;
}
/*-------------------------------------------------------------------------
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index 74db048..6a5474d 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -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;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 1c631e3..cbbeb13 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -75,6 +75,15 @@ static intn interface_initialize_g = FALSE;
* least as large as the destination. Overflows can occur if the
* destination is narrower than the source.
*
+ * su: Conversion from signed integers to unsigned integers where
+ * the source and destination are the same size. Overflow occurs
+ * when the source value is negative.
+ *
+ * us: Conversion from unsigned integers to signed integers where
+ * the source and destination are the same size. Overflow
+ * occurs when the source magnitude is too large for the
+ * destination.
+ *
* The macros take a subset of these arguments in the order listed here:
*
* CDATA: A pointer to the H5T_cdata_t structure that was passed to the
@@ -252,7 +261,7 @@ static intn interface_initialize_g = FALSE;
d = (DT*)(BUF); \
\
for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \
- if (*s > (D_MAX)) { \
+ if (*s > (DT)(D_MAX)) { \
if (!H5T_overflow_g || \
(H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \
*d = (D_MAX); \
@@ -293,15 +302,16 @@ static intn interface_initialize_g = FALSE;
d = (DT*)(BUF); \
\
for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \
- if (sizeof(ST)>sizeof(DT) && *s>(D_MAX)) {/*sign vs. unsign ok*/ \
+ if (*s < 0) { \
if (!H5T_overflow_g || \
(H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \
- *d = (D_MAX); \
+ *d = 0; \
} \
- } else if (*s < 0) { \
+ } else if (sizeof(ST)>sizeof(DT) && *s>(D_MAX)) { \
+ /*sign vs. unsign ok in previous line*/ \
if (!H5T_overflow_g || \
(H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \
- *d = 0; \
+ *d = (D_MAX); \
} \
} else { \
*d = *s; \
@@ -387,6 +397,78 @@ static intn interface_initialize_g = FALSE;
} \
}
+#define H5T_CONV_su(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT) { \
+ size_t elmtno; /*element number */ \
+ ST *s; /*source buffer */ \
+ DT *d; /*destination buffer */ \
+ \
+ assert(sizeof(ST)==sizeof(DT)); \
+ switch ((CDATA)->command) { \
+ case H5T_CONV_INIT: \
+ (CDATA)->need_bkg = H5T_BKG_NO; \
+ break; \
+ \
+ case H5T_CONV_FREE: \
+ break; \
+ \
+ case H5T_CONV_CONV: \
+ s = (ST*)(BUF); \
+ d = (DT*)(BUF); \
+ \
+ for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \
+ if (*s < 0) { \
+ if (!H5T_overflow_g || \
+ (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \
+ *d = 0; \
+ } \
+ } else { \
+ *d = *s; \
+ } \
+ } \
+ break; \
+ \
+ default: \
+ HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
+ "unknown conversion command"); \
+ } \
+}
+
+#define H5T_CONV_us(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \
+ size_t elmtno; /*element number */ \
+ ST *s; /*source buffer */ \
+ DT *d; /*destination buffer */ \
+ \
+ assert(sizeof(ST)==sizeof(DT)); \
+ switch ((CDATA)->command) { \
+ case H5T_CONV_INIT: \
+ (CDATA)->need_bkg = H5T_BKG_NO; \
+ break; \
+ \
+ case H5T_CONV_FREE: \
+ break; \
+ \
+ case H5T_CONV_CONV: \
+ s = (ST*)(BUF); \
+ d = (DT*)(BUF); \
+ \
+ for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \
+ if (*s > (D_MAX)) { \
+ if (!H5T_overflow_g || \
+ (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \
+ *d = (D_MAX); \
+ } \
+ } else { \
+ *d = *s; \
+ } \
+ } \
+ break; \
+ \
+ default: \
+ HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
+ "unknown conversion command"); \
+ } \
+}
+
/*-------------------------------------------------------------------------
* Function: H5T_conv_noop
*
@@ -451,8 +533,8 @@ herr_t
H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
void *_buf, void __unused__ *background)
{
- uint8 *buf = (uint8 *) _buf;
- uint8 tmp;
+ uint8_t *buf = (uint8_t*)_buf;
+ uint8_t tmp;
H5T_t *src = NULL;
H5T_t *dst = NULL;
size_t i, j, md;
@@ -731,8 +813,8 @@ herr_t
H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
void *_buf, void *_bkg)
{
- uint8 *buf = (uint8 *)_buf; /*cast for pointer arithmetic */
- uint8 *bkg = (uint8 *)_bkg; /*background pointer arithmetic */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
H5T_t *src = NULL; /*source data type */
H5T_t *dst = NULL; /*destination data type */
intn *src2dst = NULL; /*maps src member to dst member */
@@ -936,8 +1018,8 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t elmtno; /*element number */
size_t half_size; /*half the type size */
size_t olap; /*num overlapping elements */
- uint8 *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8 dbuf[64]; /*temp destination buffer */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ uint8_t dbuf[64]; /*temp destination buffer */
size_t first;
ssize_t sfirst; /*a signed version of `first' */
size_t i;
@@ -987,17 +1069,17 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
* overlapping?
*/
if (src->size==dst->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = nelmts;
} else if (src->size>=dst->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = (size_t)(HDceil((double)(src->size)/
(double)(src->size-dst->size))-1);
} else {
- sp = (uint8*)buf + (nelmts-1) * src->size;
- dp = (uint8*)buf + (nelmts-1) * dst->size;
+ sp = (uint8_t*)buf + (nelmts-1) * src->size;
+ dp = (uint8_t*)buf + (nelmts-1) * dst->size;
direction = -1;
olap = (size_t)(HDceil((double)(dst->size)/
(double)(dst->size-src->size))-1);
@@ -1036,7 +1118,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if (H5T_ORDER_BE==src->u.atomic.order) {
half_size = src->size/2;
for (i=0; i<half_size; i++) {
- uint8 tmp = s[src->size-(i+1)];
+ uint8_t tmp = s[src->size-(i+1)];
s[src->size-(i+1)] = s[i];
s[i] = tmp;
}
@@ -1237,7 +1319,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if (H5T_ORDER_BE==dst->u.atomic.order) {
half_size = dst->size/2;
for (i=0; i<half_size; i++) {
- uint8 tmp = d[dst->size-(i+1)];
+ uint8_t tmp = d[dst->size-(i+1)];
d[dst->size-(i+1)] = d[i];
d[i] = tmp;
}
@@ -1296,8 +1378,8 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t half_size; /*half the type size */
size_t olap; /*num overlapping elements */
ssize_t bitno; /*bit number */
- uint8 *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8 dbuf[64]; /*temp destination buffer */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ uint8_t dbuf[64]; /*temp destination buffer */
/* Conversion-related variables */
hssize_t expo; /*exponent */
@@ -1364,17 +1446,17 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
* overlapping?
*/
if (src_p->size==dst_p->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = nelmts;
} else if (src_p->size>=dst_p->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = (size_t)(HDceil((double)(src_p->size)/
(double)(src_p->size-dst_p->size))-1);
} else {
- sp = (uint8*)buf + (nelmts-1) * src_p->size;
- dp = (uint8*)buf + (nelmts-1) * dst_p->size;
+ sp = (uint8_t*)buf + (nelmts-1) * src_p->size;
+ dp = (uint8_t*)buf + (nelmts-1) * dst_p->size;
direction = -1;
olap = (size_t)(HDceil((double)(dst_p->size)/
(double)(dst_p->size-src_p->size))-1);
@@ -1412,7 +1494,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if (H5T_ORDER_BE==src.order) {
half_size = src_p->size/2;
for (i=0; i<half_size; i++) {
- uint8 tmp = s[src_p->size-(i+1)];
+ uint8_t tmp = s[src_p->size-(i+1)];
s[src_p->size-(i+1)] = s[i];
s[i] = tmp;
}
@@ -1541,7 +1623,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
* original byte order.
*/
if (H5T_overflow_g) {
- uint8 over_src[256];
+ uint8_t over_src[256];
assert(src_p->size<=sizeof over_src);
if (H5T_ORDER_BE==src.order) {
for (i=0; i<src_p->size; i++) {
@@ -1639,7 +1721,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if (H5T_ORDER_BE==dst.order) {
half_size = dst_p->size/2;
for (i=0; i<half_size; i++) {
- uint8 tmp = d[dst_p->size-(i+1)];
+ uint8_t tmp = d[dst_p->size-(i+1)];
d[dst_p->size-(i+1)] = d[i];
d[i] = tmp;
}
@@ -1690,8 +1772,8 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t elmtno; /*element number */
size_t olap; /*num overlapping elements */
size_t nchars=0; /*number of characters copied */
- uint8 *s, *sp, *d, *dp; /*src and dst traversal pointers*/
- uint8 *dbuf=NULL; /*temp buf for overlap convers. */
+ uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
+ uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
herr_t ret_value=FAIL; /*return value */
FUNC_ENTER(H5T_conv_s_s, FAIL);
@@ -1745,17 +1827,17 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
* When the source and destination are the same size we can do
* all the conversions in place.
*/
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = 0;
} else if (src->size>=dst->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = (size_t)(HDceil((double)(src->size)/
(double)(src->size-dst->size))-1);
} else {
- sp = (uint8*)buf + (nelmts-1) * src->size;
- dp = (uint8*)buf + (nelmts-1) * dst->size;
+ sp = (uint8_t*)buf + (nelmts-1) * src->size;
+ dp = (uint8_t*)buf + (nelmts-1) * dst->size;
direction = -1;
olap = (size_t)(HDceil((double)(dst->size)/
(double)(dst->size-src->size))-1);
@@ -1893,9 +1975,63 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_char_uchar
+ *
+ * Purpose: Converts `signed char' to `unsigned char'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_char_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_char_uchar, FAIL);
+ H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts,
+ signed char, unsigned char);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uchar_char
+ *
+ * Purpose: Converts `unsigned char' to `signed char'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_uchar_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_char_short, FAIL);
+ H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned char, signed char, CHAR_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_char_short
*
- * Purpose: Convertes `signed char' to `short'
+ * Purpose: Converts `signed char' to `short'
*
* Return: Success: Non-negative
*
@@ -1922,7 +2058,7 @@ H5T_conv_char_short(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_char_ushort
*
- * Purpose: Convertes `signed char' to `unsigned short'
+ * Purpose: Converts `signed char' to `unsigned short'
*
* Return: Success: Non-negative
*
@@ -2030,7 +2166,7 @@ H5T_conv_char_int(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_char_uint
*
- * Purpose: Convertes `signed char' to `unsigned int'
+ * Purpose: Converts `signed char' to `unsigned int'
*
* Return: Success: Non-negative
*
@@ -2056,7 +2192,7 @@ H5T_conv_char_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_uchar_int
*
- * Purpose: Convertes `unsigned char' to `int'
+ * Purpose: Converts `unsigned char' to `int'
*
* Return: Success: Non-negative
*
@@ -2137,7 +2273,7 @@ H5T_conv_char_long(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_char_ulong
*
- * Purpose: Convertes `signed char' to `unsigned long'
+ * Purpose: Converts `signed char' to `unsigned long'
*
* Return: Success: Non-negative
*
@@ -2164,7 +2300,7 @@ H5T_conv_char_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_uchar_long
*
- * Purpose: Convertes `unsigned char' to `long'
+ * Purpose: Converts `unsigned char' to `long'
*
* Return: Success: Non-negative
*
@@ -2216,6 +2352,114 @@ H5T_conv_uchar_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_char_llong
+ *
+ * Purpose: Converts `signed char' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_char_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
+ H5T_cdata_t *cdata, size_t nelmts, void *buf,
+ void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_char_llong, FAIL);
+ H5T_CONV_sS(cdata, buf, nelmts, signed char, long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_char_ullong
+ *
+ * Purpose: Converts `signed char' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_char_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_char_ullong, FAIL);
+ H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts,
+ signed char, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uchar_llong
+ *
+ * Purpose: Converts `unsigned char' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_uchar_llong, FAIL);
+ H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts,
+ unsigned char, long long, LLONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uchar_ullong
+ *
+ * Purpose: Converts `unsigned char' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_uchar_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
+ H5T_cdata_t *cdata, size_t nelmts, void *buf,
+ void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_uchar_ullong, FAIL);
+ H5T_CONV_uU(cdata, buf, nelmts, unsigned char, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_short_char
*
* Purpose: Converts `short' to `signed char'
@@ -2324,6 +2568,60 @@ H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_short_ushort
+ *
+ * Purpose: Converts `short' to `unsigned short'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_short_ushort, FAIL);
+ H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts,
+ short, unsigned short);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ushort_short
+ *
+ * Purpose: Converts `unsigned short' to `short'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ushort_short, FAIL);
+ H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned short, short, SHRT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_short_int
*
* Purpose: Converts `short' to `int'
@@ -2353,7 +2651,7 @@ H5T_conv_short_int(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_short_uint
*
- * Purpose: Convertes `short' to `unsigned int'
+ * Purpose: Converts `short' to `unsigned int'
*
* Return: Success: Non-negative
*
@@ -2379,7 +2677,7 @@ H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_ushort_int
*
- * Purpose: Convertes `unsigned short' to `int'
+ * Purpose: Converts `unsigned short' to `int'
*
* Return: Success: Non-negative
*
@@ -2460,7 +2758,7 @@ H5T_conv_short_long(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_short_ulong
*
- * Purpose: Convertes `short' to `unsigned long'
+ * Purpose: Converts `short' to `unsigned long'
*
* Return: Success: Non-negative
*
@@ -2486,7 +2784,7 @@ H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_ushort_long
*
- * Purpose: Convertes `unsigned short' to `long'
+ * Purpose: Converts `unsigned short' to `long'
*
* Return: Success: Non-negative
*
@@ -2538,6 +2836,114 @@ H5T_conv_ushort_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_short_llong
+ *
+ * Purpose: Converts `short' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_short_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
+ H5T_cdata_t *cdata, size_t nelmts, void *buf,
+ void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_short_llong, FAIL);
+ H5T_CONV_sS(cdata, buf, nelmts, short, long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_short_ullong
+ *
+ * Purpose: Converts `short' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_short_ullong, FAIL);
+ H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts,
+ short, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ushort_llong
+ *
+ * Purpose: Converts `unsigned short' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ushort_llong, FAIL);
+ H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts,
+ unsigned short, long long, LLONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ushort_ullong
+ *
+ * Purpose: Converts `unsigned short' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ushort_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
+ H5T_cdata_t *cdata, size_t nelmts, void *buf,
+ void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ushort_ullong, FAIL);
+ H5T_CONV_uU(cdata, buf, nelmts, unsigned short, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_int_char
*
* Purpose: Converts `int' to `signed char'
@@ -2754,6 +3160,60 @@ H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_int_uint
+ *
+ * Purpose: Converts `int' to `unsigned int'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_int_uint, FAIL);
+ H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts,
+ int, unsigned);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uint_int
+ *
+ * Purpose: Converts `unsigned int' to `int'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_uint_int, FAIL);
+ H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned, int, INT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_int_long
*
* Purpose: Converts `int' to `long'
@@ -2783,7 +3243,7 @@ H5T_conv_int_long(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_int_ulong
*
- * Purpose: Convertes `int' to `unsigned long'
+ * Purpose: Converts `int' to `unsigned long'
*
* Return: Success: Non-negative
*
@@ -2809,7 +3269,7 @@ H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_uint_long
*
- * Purpose: Convertes `unsigned int' to `long'
+ * Purpose: Converts `unsigned int' to `long'
*
* Return: Success: Non-negative
*
@@ -2861,6 +3321,114 @@ H5T_conv_uint_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_int_llong
+ *
+ * Purpose: Converts `int' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_int_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
+ H5T_cdata_t *cdata, size_t nelmts, void *buf,
+ void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_int_llong, FAIL);
+ H5T_CONV_sS(cdata, buf, nelmts, int, long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_int_ullong
+ *
+ * Purpose: Converts `int' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_int_ullong, FAIL);
+ H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts,
+ int, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uint_llong
+ *
+ * Purpose: Converts `unsigned int' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_uint_llong, FAIL);
+ H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts,
+ unsigned, long long, LLONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uint_ullong
+ *
+ * Purpose: Converts `unsigned int' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_uint_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
+ H5T_cdata_t *cdata, size_t nelmts, void *buf,
+ void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_uint_ullong, FAIL);
+ H5T_CONV_uU(cdata, buf, nelmts, unsigned, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_long_char
*
* Purpose: Converts `long' to `signed char'
@@ -2909,7 +3477,7 @@ H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
{
FUNC_ENTER(H5T_conv_long_uchar, FAIL);
H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts,
- long, unsigned char, CHAR_MAX);
+ long, unsigned char, UCHAR_MAX);
FUNC_LEAVE(SUCCEED);
}
@@ -3185,6 +3753,654 @@ H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_long_ulong
+ *
+ * Purpose: Converts `long' to `unsigned long'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_long_ulong, FAIL);
+ H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts,
+ long, unsigned long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ulong_long
+ *
+ * Purpose: Converts `unsigned long' to `long'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ulong_long, FAIL);
+ H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long, long, LONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_long_llong
+ *
+ * Purpose: Converts `long' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_long_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
+ H5T_cdata_t *cdata, size_t nelmts, void *buf,
+ void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_long_llong, FAIL);
+ H5T_CONV_sS(cdata, buf, nelmts, long, long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_long_ullong
+ *
+ * Purpose: Converts `long' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_long_ullong, FAIL);
+ H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts,
+ long, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ulong_llong
+ *
+ * Purpose: Converts `unsigned long' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_long_llong, FAIL);
+ H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long, long long, LLONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ulong_ullong
+ *
+ * Purpose: Converts `unsigned long' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ulong_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
+ H5T_cdata_t *cdata, size_t nelmts, void *buf,
+ void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ulong_ullong, FAIL);
+ H5T_CONV_uU(cdata, buf, nelmts, unsigned long, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_char
+ *
+ * Purpose: Converts `long long' to `signed char'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_llong_char, FAIL);
+ H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts,
+ long long, signed char, CHAR_MIN, CHAR_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_uchar
+ *
+ * Purpose: Converts `long long' to `unsigned char'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_llong_uchar, FAIL);
+ H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts,
+ long long, unsigned char, UCHAR_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_char
+ *
+ * Purpose: Converts `unsigned long long' to `signed char'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ullong_char, FAIL);
+ H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, signed char, CHAR_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_uchar
+ *
+ * Purpose: Converts `unsigned long long' to `unsigned char'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ullong_uchar, FAIL);
+ H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, unsigned char, UCHAR_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_short
+ *
+ * Purpose: Converts `long long' to `short'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_llong_short, FAIL);
+ H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts,
+ long long, short, SHRT_MIN, SHRT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_ushort
+ *
+ * Purpose: Converts `long long' to `unsigned short'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_llong_ushort, FAIL);
+ H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts,
+ long long, unsigned short, USHRT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_short
+ *
+ * Purpose: Converts `unsigned long long' to `short'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ullong_short, FAIL);
+ H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, short, SHRT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_ushort
+ *
+ * Purpose: Converts `unsigned long long' to `unsigned short'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ullong_ushort, FAIL);
+ H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, unsigned short, USHRT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_int
+ *
+ * Purpose: Converts `long long' to `int'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_llong_int, FAIL);
+ H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts,
+ long long, int, INT_MIN, INT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_uint
+ *
+ * Purpose: Converts `long long' to `unsigned int'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_llong_uint, FAIL);
+ H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts,
+ long long, unsigned, UINT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_int
+ *
+ * Purpose: Converts `unsigned long long' to `int'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ullong_int, FAIL);
+ H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, int, INT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_uint
+ *
+ * Purpose: Converts `unsigned long long' to `unsigned int'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ullong_uint, FAIL);
+ H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, unsigned, UINT_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_long
+ *
+ * Purpose: Converts `long long' to `long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_llong_long, FAIL);
+ H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts,
+ long long, long, LONG_MIN, LONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_ulong
+ *
+ * Purpose: Converts `long long' to `unsigned long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_llong_ulong, FAIL);
+ H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts,
+ long long, unsigned long, ULONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_long
+ *
+ * Purpose: Converts `unsigned long long' to `long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ullong_long, FAIL);
+ H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, long, LONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_ulong
+ *
+ * Purpose: Converts `unsigned long long' to `unsigned long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ullong_ulong, FAIL);
+ H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, unsigned long, ULONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_ullong
+ *
+ * Purpose: Converts `long long' to `unsigned long long'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_llong_ullong, FAIL);
+ H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts,
+ long long, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_llong
+ *
+ * Purpose: Converts `unsigned long long' to `long long'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_ullong_llong, FAIL);
+ H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, long long, LLONG_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_float_double
*
* Purpose: Convert native `float' to native `double' using hardware.
@@ -3322,8 +4538,8 @@ herr_t
H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void __unused__ *bkg)
{
- uint8 *s=NULL, *d=NULL; /*src and dst buf pointers */
- uint8 tmp[8]; /*temporary destination buffer */
+ uint8_t *s=NULL, *d=NULL; /*src and dst buf pointers */
+ uint8_t tmp[8]; /*temporary destination buffer */
H5T_t *src = NULL; /*source data type */
size_t elmtno; /*element counter */
uintn sign; /*sign bit */
@@ -3353,8 +4569,8 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
- s = (uint8*)buf + 4*(nelmts-1);
- d = (uint8*)buf + 8*(nelmts-1);
+ s = (uint8_t*)buf + 4*(nelmts-1);
+ d = (uint8_t*)buf + 8*(nelmts-1);
for (elmtno=0; elmtno<nelmts; elmtno++, s-=4, d-=8) {
/*
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 13fa389..2679b75 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -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
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index 3b602a1..8cdc4f1 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -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);
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index 188d3d6..c2f8279 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -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;
diff --git a/src/H5V.c b/src/H5V.c
index c7bf735..6504ed0 100644
--- a/src/H5V.c
+++ b/src/H5V.c
@@ -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 */
diff --git a/src/H5Z.c b/src/H5Z.c
index 72f4213..1a52b78 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -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;
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 3bdd638..11a538a 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -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
diff --git a/src/H5detect.c b/src/H5detect.c
index 9979135..26024b1 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -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++) {
diff --git a/src/H5private.h b/src/H5private.h
index f32b9a8..f9e16f4 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -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_INT8_T==0
+typedef signed char int8_t;
+#endif
-#if SIZEOF_SHORT==2
-typedef short int16;
-typedef unsigned short uint16;
-#else
-typedef int int16; /*not really */
-typedef unsigned uint16; /*not really */
+#if SIZEOF_UINT8_T==0
+typedef unsigned char uint8_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 */
-#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)