diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1998-10-26 22:44:13 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1998-10-26 22:44:13 (GMT) |
commit | 7dcbae97f23f8409ed8d60640b3b2a8aaed70978 (patch) | |
tree | 54ba54ec5cdcda9651d63a4471a9a9ec2204e767 /src | |
parent | a7b166727dce2c23c2a0c7805c3e3b8d38e4be2d (diff) | |
download | hdf5-7dcbae97f23f8409ed8d60640b3b2a8aaed70978.zip hdf5-7dcbae97f23f8409ed8d60640b3b2a8aaed70978.tar.gz hdf5-7dcbae97f23f8409ed8d60640b3b2a8aaed70978.tar.bz2 |
[svn-r800] Made a "htri_t" as a return value from "boolean" functions returning
TRUE/FALSE/FAIL, hbool_t is now strictly for true boolean values.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5F.c | 4 | ||||
-rw-r--r-- | src/H5Fcore.c | 4 | ||||
-rw-r--r-- | src/H5Ffamily.c | 8 | ||||
-rw-r--r-- | src/H5Flow.c | 8 | ||||
-rw-r--r-- | src/H5Fmpio.c | 10 | ||||
-rw-r--r-- | src/H5Fprivate.h | 10 | ||||
-rw-r--r-- | src/H5Fpublic.h | 2 | ||||
-rw-r--r-- | src/H5Fsplit.c | 6 | ||||
-rw-r--r-- | src/H5S.c | 12 | ||||
-rw-r--r-- | src/H5Shyper.c | 6 | ||||
-rw-r--r-- | src/H5Spoint.c | 6 | ||||
-rw-r--r-- | src/H5Sprivate.h | 8 | ||||
-rw-r--r-- | src/H5Spublic.h | 4 | ||||
-rw-r--r-- | src/H5Sselect.c | 12 | ||||
-rw-r--r-- | src/H5T.c | 8 | ||||
-rw-r--r-- | src/H5Tbit.c | 14 | ||||
-rw-r--r-- | src/H5Tpkg.h | 2 | ||||
-rw-r--r-- | src/H5Tprivate.h | 2 | ||||
-rw-r--r-- | src/H5Tpublic.h | 4 | ||||
-rw-r--r-- | src/H5V.c | 4 | ||||
-rw-r--r-- | src/H5Vprivate.h | 8 | ||||
-rw-r--r-- | src/H5public.h | 3 |
22 files changed, 73 insertions, 72 deletions
@@ -444,7 +444,7 @@ H5F_locate_signature(H5F_low_t *f_handle, const H5F_access_t *access_parms, Check the file signature to detect an HDF5 file. USAGE - hbool_t H5Fis_hdf5(filename) + htri_t H5Fis_hdf5(filename) const char *filename; IN: Name of the file to check ERRORS ARGS BADRANGE No filename specified. @@ -460,7 +460,7 @@ H5F_locate_signature(H5F_low_t *f_handle, const H5F_access_t *access_parms, DESCRIPTION This function determines if a file is an HDF5 format file. --------------------------------------------------------------------------*/ -hbool_t +htri_t H5Fis_hdf5(const char *filename) { H5F_low_t *f_handle = NULL; /* file handle */ diff --git a/src/H5Fcore.c b/src/H5Fcore.c index 49c41a9..dfc02bb 100644 --- a/src/H5Fcore.c +++ b/src/H5Fcore.c @@ -25,7 +25,7 @@ static hbool_t interface_initialize_g = FALSE; #define INTERFACE_INIT NULL -static hbool_t H5F_core_access(const char *name, +static htri_t H5F_core_access(const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key/*out*/); static H5F_low_t *H5F_core_open(const char *name, @@ -69,7 +69,7 @@ const H5F_low_class_t H5F_LOW_CORE_g[1] = {{ * *------------------------------------------------------------------------- */ -static hbool_t +static htri_t H5F_core_access(const char __unused__*name, const H5F_access_t __unused__ *access_parms, int __unused__ mode, H5F_search_t __unused__ *key/*out*/) diff --git a/src/H5Ffamily.c b/src/H5Ffamily.c index db8f0ea..d5d06eb 100644 --- a/src/H5Ffamily.c +++ b/src/H5Ffamily.c @@ -35,7 +35,7 @@ static hbool_t interface_initialize_g = FALSE; #define H5F_FAM_MEMBNO(LF,ADDR) ((intn)((ADDR)->offset / \ (LF)->u.fam.memb_size.offset)) -static hbool_t H5F_fam_access(const char *name, +static htri_t H5F_fam_access(const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key/*out*/); static H5F_low_t *H5F_fam_open(const char *name, @@ -564,14 +564,14 @@ H5F_fam_flush(H5F_low_t *lf, const H5F_access_t *access_parms) * *------------------------------------------------------------------------- */ -static hbool_t +static htri_t H5F_fam_access(const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key/*out*/) { intn membno; char member_name[4096]; - hbool_t status; - hbool_t ret_value = FALSE; + htri_t status; + htri_t ret_value = FALSE; const H5F_low_class_t *memb_type = NULL; FUNC_ENTER(H5F_fam_access, FAIL); diff --git a/src/H5Flow.c b/src/H5Flow.c index 59a2425..cad16a6 100644 --- a/src/H5Flow.c +++ b/src/H5Flow.c @@ -477,12 +477,12 @@ H5F_low_size(H5F_low_t *lf, haddr_t *eof/*out*/) * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5F_low_access(const H5F_low_class_t *type, const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key/*out*/) { - hbool_t ret_value; + htri_t ret_value; struct stat sb; FUNC_ENTER(H5F_low_size, FAIL); @@ -708,7 +708,7 @@ H5F_addr_undef(haddr_t *addr/*out*/) * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5F_addr_defined(const haddr_t *addr) { FUNC_ENTER(H5F_addr_defined, FAIL); @@ -752,7 +752,7 @@ H5F_addr_reset(haddr_t *addr/*out*/) * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5F_addr_zerop(const haddr_t *addr) { FUNC_ENTER(H5F_addr_zerop, FAIL); diff --git a/src/H5Fmpio.c b/src/H5Fmpio.c index b47188c..55080dc 100644 --- a/src/H5Fmpio.c +++ b/src/H5Fmpio.c @@ -99,7 +99,7 @@ static int H5F_mpio_Debug[256] = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; #endif -static hbool_t H5F_mpio_access(const char *name, +static htri_t H5F_mpio_access(const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key/*out*/); static H5F_low_t *H5F_mpio_open(const char *name, @@ -109,7 +109,7 @@ 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*/); -hbool_t H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval ); +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); @@ -195,11 +195,11 @@ ino_t mpio_inode_num = 0; /* fake "inode" number */ * *------------------------------------------------------------------------- */ -static hbool_t +static htri_t H5F_mpio_access(const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key/*out*/) { - hbool_t ret_val = FALSE; + htri_t ret_val = FALSE; MPI_File fh; int mpierr; int mpi_mode; @@ -649,7 +649,7 @@ H5F_mpio_read(H5F_low_t *lf, H5F_access_t *access_parms, * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval ) { hbool_t oldval; diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 4b42665..ec37e56 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -312,7 +312,7 @@ typedef struct H5MF_free_t { * Define the low-level file interface. */ typedef struct H5F_low_class_t { - hbool_t (*access)(const char *name, const H5F_access_t *access_parms, + htri_t (*access)(const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key/*out*/); struct H5F_low_t *(*open)(const char *name, const H5F_access_t *access_parms, uintn flags, @@ -611,7 +611,7 @@ herr_t H5F_low_seteof(H5F_low_t *lf, const haddr_t *addr); intn H5F_low_alloc (H5F_low_t *lf, intn op, hsize_t alignment, hsize_t threshold, hsize_t size, H5MF_free_t *blk, haddr_t *addr/*out*/); -hbool_t H5F_low_access(const H5F_low_class_t *type, const char *name, +htri_t H5F_low_access(const H5F_low_class_t *type, const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key); H5F_low_t *H5F_low_open(const H5F_low_class_t *type, const char *name, @@ -636,10 +636,10 @@ herr_t H5F_low_flush(H5F_low_t *lf, const H5F_access_t *access_parms); #define H5F_addr_ge(A1,A2) (H5F_addr_cmp(A1,A2)>=0) intn H5F_addr_cmp(const haddr_t *, const haddr_t *); -hbool_t H5F_addr_defined(const haddr_t *); +htri_t H5F_addr_defined(const haddr_t *); void H5F_addr_undef(haddr_t *); void H5F_addr_reset(haddr_t *); -hbool_t H5F_addr_zerop(const 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_print(FILE *, const haddr_t *); @@ -651,7 +651,7 @@ uintn H5F_addr_hash(const haddr_t *, uintn mod); /* Functions for MPI-IO */ #ifdef HAVE_PARALLEL -hbool_t H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval ); +htri_t H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval ); #endif /* HAVE_PARALLEL */ #endif diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 239b321..42717ca 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -83,7 +83,7 @@ extern "C" { #endif /* Functions in H5F.c */ -hbool_t H5Fis_hdf5 (const char *filename); +htri_t H5Fis_hdf5 (const char *filename); hid_t H5Fcreate (const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist); hid_t H5Fopen (const char *filename, unsigned flags, hid_t access_plist); diff --git a/src/H5Fsplit.c b/src/H5Fsplit.c index b3fcc10..e63ed72 100644 --- a/src/H5Fsplit.c +++ b/src/H5Fsplit.c @@ -25,7 +25,7 @@ static hbool_t interface_initialize_g = FALSE; #define INTERFACE_INIT NULL -static hbool_t H5F_split_access(const char *name, +static htri_t H5F_split_access(const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key/*out*/); static H5F_low_t *H5F_split_open(const char *name, @@ -342,12 +342,12 @@ H5F_split_flush(H5F_low_t *lf, const H5F_access_t *access_parms) * *------------------------------------------------------------------------- */ -static hbool_t +static htri_t H5F_split_access(const char *name, const H5F_access_t *access_parms, int mode, H5F_search_t *key/*out*/) { char fullname[4096]; - hbool_t status; + htri_t status; const char *ext; /*file extension*/ const H5F_low_class_t *meta_type = NULL; const H5F_low_class_t *raw_type = NULL; @@ -1182,7 +1182,7 @@ H5S_cmp(const H5S_t *ds1, const H5S_t *ds2) PURPOSE Check if a dataspace is simple (internal) USAGE - hbool_t H5S_is_simple(sdim) + htri_t H5S_is_simple(sdim) H5S_t *sdim; IN: Pointer to dataspace object to query RETURNS TRUE/FALSE/FAIL @@ -1190,10 +1190,10 @@ H5S_cmp(const H5S_t *ds1, const H5S_t *ds2) This function determines the if a dataspace is "simple". ie. if it has orthogonal, evenly spaced dimensions. --------------------------------------------------------------------------*/ -hbool_t +htri_t H5S_is_simple(const H5S_t *sdim) { - hbool_t ret_value = FAIL; + htri_t ret_value = FAIL; FUNC_ENTER(H5S_is_simple, FAIL); @@ -1211,7 +1211,7 @@ H5S_is_simple(const H5S_t *sdim) PURPOSE Check if a dataspace is simple USAGE - hbool_t H5Sis_simple(space_id) + htri_t H5Sis_simple(space_id) hid_t space_id; IN: ID of dataspace object to query RETURNS TRUE/FALSE/FAIL @@ -1219,11 +1219,11 @@ H5S_is_simple(const H5S_t *sdim) This function determines the if a dataspace is "simple". ie. if it has orthogonal, evenly spaced dimensions. --------------------------------------------------------------------------*/ -hbool_t +htri_t H5Sis_simple(hid_t space_id) { H5S_t *space = NULL; /* dataspace to modify */ - hbool_t ret_value = FAIL; + htri_t ret_value = FAIL; FUNC_ENTER(H5Sis_simple, FAIL); H5TRACE1("b","i",space_id); diff --git a/src/H5Shyper.c b/src/H5Shyper.c index b5e383c..768201e 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2585,7 +2585,7 @@ done: Check whether the selection fits within the extent, with the current offset defined. USAGE - hbool_t H5S_hyper_select_valid(space); + htri_t H5S_hyper_select_valid(space); H5S_t *space; IN: Dataspace pointer to query RETURNS TRUE if the selection fits within the extent, FALSE if it does not and @@ -2598,12 +2598,12 @@ done: EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -hbool_t +htri_t H5S_hyper_select_valid (const H5S_t *space) { H5S_hyper_node_t *curr; /* Hyperslab information nodes */ intn i; /* Counter */ - hbool_t ret_value=TRUE; /* return value */ + htri_t ret_value=TRUE; /* return value */ FUNC_ENTER (H5S_hyper_select_valid, FAIL); diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 560d0a2..d0c966a 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -788,7 +788,7 @@ done: Check whether the selection fits within the extent, with the current offset defined. USAGE - hbool_t H5S_point_select_valid(space); + htri_t H5S_point_select_valid(space); H5S_t *space; IN: Dataspace pointer to query RETURNS TRUE if the selection fits within the extent, FALSE if it does not and @@ -801,12 +801,12 @@ done: EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -hbool_t +htri_t H5S_point_select_valid (const H5S_t *space) { H5S_pnt_node_t *curr; /* Point information nodes */ intn i; /* Counter */ - hbool_t ret_value=TRUE; /* return value */ + htri_t ret_value=TRUE; /* return value */ FUNC_ENTER (H5S_point_select_valid, FAIL); diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 550b8a7..9b920e3 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -300,7 +300,7 @@ intn H5S_get_simple_extent_dims (const H5S_t *ds, hsize_t dims[]/*out*/, herr_t H5S_modify (H5G_entry_t *ent, const H5S_t *space); H5S_t *H5S_read (H5G_entry_t *ent); intn H5S_cmp (const H5S_t *ds1, const H5S_t *ds2); -hbool_t H5S_is_simple (const H5S_t *sdim); +htri_t H5S_is_simple (const H5S_t *sdim); uintn H5S_nelem (const H5S_t *space); H5S_conv_t *H5S_find (const H5S_t *mem_space, const H5S_t *file_space); herr_t H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, @@ -320,7 +320,7 @@ hssize_t H5S_get_select_npoints (const H5S_t *space); intn H5S_extend (H5S_t *space, const hsize_t *size); herr_t H5S_set_extent_simple (H5S_t *space, int rank, const hsize_t *dims, const hsize_t *max); -hbool_t H5S_select_valid (const H5S_t *space); +htri_t H5S_select_valid (const H5S_t *space); herr_t H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, intn indent, intn fwidth); herr_t H5S_register(H5S_sel_type cls, const H5S_fconv_t *fconv, @@ -331,7 +331,7 @@ herr_t H5S_point_add (H5S_t *space, size_t num_elemn, const hssize_t **coord); herr_t H5S_point_release (H5S_t *space); hsize_t H5S_point_npoints (const H5S_t *space); herr_t H5S_point_copy (H5S_t *dst, const H5S_t *src); -hbool_t H5S_point_select_valid (const H5S_t *space); +htri_t H5S_point_select_valid (const H5S_t *space); /* "All" select functions */ herr_t H5S_all_release (H5S_t *space); @@ -345,7 +345,7 @@ hsize_t H5S_hyper_npoints (const H5S_t *space); int H5S_hyper_compare_regions (const void *r1, const void *r2); int H5S_hyper_compare_bounds (const void *r1, const void *r2); herr_t H5S_hyper_copy (H5S_t *dst, const H5S_t *src); -hbool_t H5S_hyper_select_valid (const H5S_t *space); +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); diff --git a/src/H5Spublic.h b/src/H5Spublic.h index bdf339a..fee1d00 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -63,7 +63,7 @@ hsize_t H5Sget_simple_extent_npoints (hid_t space_id); int H5Sget_simple_extent_ndims (hid_t space_id); int H5Sget_simple_extent_dims (hid_t space_id, hsize_t dims[], hsize_t maxdims[]); -hbool_t H5Sis_simple (hid_t space_id); +htri_t H5Sis_simple (hid_t space_id); herr_t H5Sset_space (hid_t space_id, int rank, const hsize_t *dims); hssize_t H5Sget_select_npoints (hid_t spaceid); herr_t H5Sselect_hyperslab (hid_t space_id, H5S_seloper_t op, @@ -77,7 +77,7 @@ herr_t H5Sextent_copy (hid_t dst_id,hid_t src_id); herr_t H5Sselect_all (hid_t spaceid); herr_t H5Sselect_none (hid_t spaceid); herr_t H5Soffset_simple (hid_t space_id, const hssize_t *offset); -hbool_t H5Sselect_valid (hid_t spaceid); +htri_t H5Sselect_valid (hid_t spaceid); #ifdef __cplusplus } diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 73e5a4d..bd7962f 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -845,7 +845,7 @@ H5S_sel_iter_release (const H5S_t *space, H5S_sel_iter_t *sel_iter) Check whether the selection fits within the extent, with the current offset defined. USAGE - hbool_t H5Sselect_void(dsid) + htri_t H5Sselect_void(dsid) hid_t dsid; IN: Dataspace ID to query RETURNS TRUE if the selection fits within the extent, FALSE if it does not and @@ -858,11 +858,11 @@ H5S_sel_iter_release (const H5S_t *space, H5S_sel_iter_t *sel_iter) EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -hbool_t +htri_t H5Sselect_valid(hid_t spaceid) { H5S_t *space = NULL; /* Dataspace to modify selection of */ - hbool_t ret_value=FAIL; /* return value */ + htri_t ret_value=FAIL; /* return value */ FUNC_ENTER (H5Sselect_valid, 0); H5TRACE1("b","i",spaceid); @@ -885,7 +885,7 @@ H5Sselect_valid(hid_t spaceid) Check whether the selection fits within the extent, with the current offset defined. USAGE - hbool_t H5Sselect_void(space) + htri_t H5Sselect_void(space) H5S_t *space; IN: Dataspace pointer to query RETURNS TRUE if the selection fits within the extent, FALSE if it does not and @@ -898,10 +898,10 @@ H5Sselect_valid(hid_t spaceid) EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -hbool_t +htri_t H5S_select_valid (const H5S_t *space) { - hbool_t ret_value=FAIL; /* return value */ + htri_t ret_value=FAIL; /* return value */ FUNC_ENTER (H5S_select_valid, FAIL); @@ -1010,7 +1010,7 @@ H5Tcommit(hid_t loc_id, const char *name, hid_t type_id) * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5Tcommitted(hid_t type_id) { H5T_t *type = NULL; @@ -1161,12 +1161,12 @@ H5Tclose(hid_t type_id) * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5Tequal(hid_t type1_id, hid_t type2_id) { const H5T_t *dt1 = NULL; const H5T_t *dt2 = NULL; - hbool_t ret_value = FAIL; + htri_t ret_value = FAIL; FUNC_ENTER(H5Tequal, FAIL); H5TRACE2("b","ii",type1_id,type2_id); @@ -3820,7 +3820,7 @@ H5T_close(H5T_t *dt) * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5T_is_atomic(const H5T_t *dt) { FUNC_ENTER(H5T_is_atomic, FAIL); diff --git a/src/H5Tbit.c b/src/H5Tbit.c index 8b0b53b..74db048 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -328,7 +328,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction, /* Beginning */ if (offset) { for (i=offset; i<8 && size>0; i++, size--) { - if (value==((buf[idx]>>i) & 0x01)) { + if (value==(hbool_t)((buf[idx]>>i) & 0x01)) { return 8*idx+i - base; } } @@ -339,7 +339,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction, while (size>=8) { if ((value?0x00:0xff)!=buf[idx]) { for (i=0; i<8; i++) { - if (value==((buf[idx]>>i) & 0x01)) { + if (value==(hbool_t)((buf[idx]>>i) & 0x01)) { return 8*idx+i - base; } } @@ -349,7 +349,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction, } /* End */ for (i=0; i<(ssize_t)size; i++) { - if (value==((buf[idx]>>i) & 0x01)) { + if (value==(hbool_t)((buf[idx]>>i) & 0x01)) { return 8*idx+i - base; } } @@ -363,7 +363,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction, /* Beginning */ if (size>8-offset && (offset+size)%8) { for (i=(offset+size)%8-1; i>=0; --i, --size) { - if (value==((buf[idx]>>i) & 0x01)) { + if (value==(hbool_t)((buf[idx]>>i) & 0x01)) { return 8*idx+i - base; } } @@ -373,7 +373,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction, while (size>=8) { if ((value?0x00:0xff)!=buf[idx]) { for (i=7; i>=0; --i) { - if (value==((buf[idx]>>i) & 0x01)) { + if (value==(hbool_t)((buf[idx]>>i) & 0x01)) { return 8*idx+i - base; } } @@ -384,7 +384,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction, /* End */ if (size>0) { for (i=offset+size-1; i>=(ssize_t)offset; --i) { - if (value==((buf[idx]>>i) & 0x01)) { + if (value==(hbool_t)((buf[idx]>>i) & 0x01)) { return 8*idx+i - base; } } @@ -414,7 +414,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction, * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5T_bit_inc(uint8 *buf, size_t start, size_t size) { size_t idx = start / 8; diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 4930bd5..2c7621b 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -155,6 +155,6 @@ 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, H5T_sdir_t direction, hbool_t value); -hbool_t H5T_bit_inc(uint8 *buf, size_t start, size_t size); +htri_t H5T_bit_inc(uint8 *buf, size_t start, size_t size); #endif diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index 7d22895..25d4f6d 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -52,7 +52,7 @@ herr_t H5T_lock (H5T_t *dt, hbool_t immutable); herr_t H5T_close (H5T_t *dt); size_t H5T_get_size (const H5T_t *dt); intn H5T_cmp (const H5T_t *dt1, const H5T_t *dt2); -hbool_t H5T_is_atomic (const H5T_t *dt); +htri_t H5T_is_atomic (const H5T_t *dt); herr_t H5T_insert (H5T_t *parent, const char *name, size_t offset, intn ndims, const size_t *dim, const intn *perm, const H5T_t *member); diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index acf0510..8c7792e 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -377,10 +377,10 @@ hid_t H5Topen (hid_t loc_id, const char *name); hid_t H5Tcreate (H5T_class_t type, size_t size); hid_t H5Tcopy (hid_t type_id); herr_t H5Tclose (hid_t type_id); -hbool_t H5Tequal (hid_t type1_id, hid_t type2_id); +htri_t H5Tequal (hid_t type1_id, hid_t type2_id); herr_t H5Tlock (hid_t type_id); herr_t H5Tcommit (hid_t loc_id, const char *name, hid_t type_id); -hbool_t H5Tcommitted (hid_t type_id); +htri_t H5Tcommitted (hid_t type_id); /* Operations defined on compound data types */ herr_t H5Tinsert (hid_t parent_id, const char *name, size_t offset, @@ -200,7 +200,7 @@ H5V_hyper_stride(intn n, const hsize_t *size, * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5V_hyper_eq(intn n, const hssize_t *offset1, const hsize_t *size1, const hssize_t *offset2, const hsize_t *size2) @@ -241,7 +241,7 @@ H5V_hyper_eq(intn n, * *------------------------------------------------------------------------- */ -hbool_t +htri_t H5V_hyper_disjointp(intn n, const hssize_t *offset1, const hsize_t *size1, const hssize_t *offset2, const hsize_t *size2) diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h index 0f29e7e..cfcc5be 100644 --- a/src/H5Vprivate.h +++ b/src/H5Vprivate.h @@ -42,10 +42,10 @@ hsize_t H5V_hyper_stride(intn n, const hsize_t *size, const hsize_t *total_size, const hssize_t *offset, hssize_t *stride); -hbool_t H5V_hyper_disjointp(intn n, const hssize_t *offset1, +htri_t H5V_hyper_disjointp(intn n, const hssize_t *offset1, const hsize_t *size1, const hssize_t *offset2, const hsize_t *size2); -hbool_t H5V_hyper_eq(intn n, const hssize_t *offset1, const hsize_t *size1, +htri_t H5V_hyper_eq(intn n, const hssize_t *offset1, const hsize_t *size1, const hssize_t *offset2, const hsize_t *size2); herr_t H5V_hyper_fill(intn n, const hsize_t *_size, const hsize_t *total_size, const hssize_t *offset, void *_dst, uintn fill_value); @@ -116,7 +116,7 @@ H5V_vector_reduce_product(intn n, const hsize_t *v) * *------------------------------------------------------------------------- */ -static inline hbool_t __unused__ +static inline htri_t __unused__ H5V_vector_zerop_u(intn n, const hsize_t *v) { if (!v) return TRUE; @@ -143,7 +143,7 @@ H5V_vector_zerop_u(intn n, const hsize_t *v) * *------------------------------------------------------------------------- */ -static inline hbool_t __unused__ +static inline htri_t __unused__ H5V_vector_zerop_s(intn n, const hssize_t *v) { if (!v) return TRUE; diff --git a/src/H5public.h b/src/H5public.h index 12bada4..d5e5509 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -60,7 +60,8 @@ typedef int herr_t; * printf("error determining whether data type is committed\n"); * } */ -typedef int hbool_t; +typedef unsigned int hbool_t; /* For truly boolean values */ +typedef int htri_t; /* For values that might be TRUE/FALSE/FAIL */ /* * The sizes of file-objects in hdf5 have their own types defined here. On |