From 1203b1652882a33781ae501dc004f9adb3bef37a Mon Sep 17 00:00:00 2001 From: Robb Matzke Date: Mon, 26 Oct 1998 22:56:31 -0500 Subject: [svn-r802] Misc. white space adjustments here and there, mostly in comments. --- src/H5.c | 9 +++------ src/H5AC.c | 2 +- src/H5B.c | 10 +++++----- src/H5Distore.c | 16 +++++++++------- src/H5Fcore.c | 6 +++--- src/H5Ffamily.c | 4 ++-- src/H5Fistore.c | 16 +++++++++------- src/H5Flow.c | 9 ++++++--- src/H5Fmpio.c | 14 ++++++++------ src/H5Fprivate.h | 4 ++-- src/H5Fsplit.c | 6 +++--- src/H5G.c | 4 ++-- src/H5Vprivate.h | 4 ++-- src/H5public.h | 10 ++++++---- 14 files changed, 61 insertions(+), 53 deletions(-) diff --git a/src/H5.c b/src/H5.c index 222e304..0f58941 100644 --- a/src/H5.c +++ b/src/H5.c @@ -417,8 +417,7 @@ H5_debug_mask(const char *s) * printf("%u.%u.%u", maj, min, rel) or * printf("version %u.%u release %u", maj, min, rel) * - * Return: - * Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Unknown * @@ -495,8 +494,7 @@ H5check_version (unsigned majnum, unsigned minnum, unsigned relnum) * is failing inexplicably, then try calling this function * first. * - * Return: - * Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Tuesday, December 9, 1997 @@ -519,8 +517,7 @@ H5open(void) * * Purpose: Terminate the library and release all resources. * - * Return: - * Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Friday, January 30, 1998 diff --git a/src/H5AC.c b/src/H5AC.c index b63bbf0..73261c7 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -328,7 +328,7 @@ H5AC_compare(const void *_a, const void *_b) * items before this function returns failure. * * Return: Non-negative on success/Negative on failure if there was a - * request to flush all items and something was protected. + * request to flush all items and something was protected. * * Programmer: Robb Matzke * matzke@llnl.gov diff --git a/src/H5B.c b/src/H5B.c index 5db2513..32fb141 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -490,8 +490,8 @@ H5B_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5B_t *bt) * from the parent node. * * Return: Non-negative on success (if found, values returned through the - * UDATA argument.) /Negative on failure (if not found, UDATA is - * undefined.) + * UDATA argument). Negative on failure (if not found, UDATA is + * undefined). * * Programmer: Robb Matzke * matzke@llnl.gov @@ -589,7 +589,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, const haddr_t *addr, void *udata) * node. * * Return: Non-negative on success (The address of the new node is - * returned through the NEW_ADDR argument.) /Negative on failure + * returned through the NEW_ADDR argument). Negative on failure. * * Programmer: Robb Matzke * matzke@llnl.gov @@ -1859,8 +1859,8 @@ H5B_remove_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type, * * Note: The current version does not attempt to rebalance the tree. * - * Return: Non-negative on success/Negative on failure (Failure includes not - * being able to find the object which is to be removed.) + * Return: Non-negative on success/Negative on failure (failure includes + * not being able to find the object which is to be removed). * * Programmer: Robb Matzke * Wednesday, September 16, 1998 diff --git a/src/H5Distore.c b/src/H5Distore.c index ccbc54f..c30a24f 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -442,9 +442,11 @@ H5F_istore_cmp3(H5F_t __unused__ *f, void *_lt_key, void *_udata, * the domain represented by UDATA doesn't intersect the domain * already represented by the B-tree. * - * Return: Non-negative on success (The address of leaf is returned through - * the ADDR argument. It is also added to the UDATA.) - * /Negative on failure + * Return: Success: Non-negative. The address of leaf is returned + * through the ADDR argument. It is also added + * to the UDATA. + * + * Failure: Negative * * Programmer: Robb Matzke * Tuesday, October 14, 1997 @@ -532,8 +534,8 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op, * called with the maximum stored chunk indices less than the * requested chunk indices. * - * Return: Non-negative on success (with information about the chunk returned - * through the UDATA argument.) /Negative on failure + * Return: Non-negative on success with information about the chunk + * returned through the UDATA argument. Negative on failure. * * Programmer: Robb Matzke * Thursday, October 9, 1997 @@ -1852,8 +1854,8 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout, * This function must be called before passing ISTORE to any of * the other indexed storage functions! * - * Return: Non-negative on success (with the ISTORE argument initialized and - * ready to write to an object header.) /Negative on failure + * Return: Non-negative on success (with the ISTORE argument initialized + * and ready to write to an object header). Negative on failure. * * Programmer: Robb Matzke * Tuesday, October 21, 1997 diff --git a/src/H5Fcore.c b/src/H5Fcore.c index dfc02bb..d67eebd 100644 --- a/src/H5Fcore.c +++ b/src/H5Fcore.c @@ -26,8 +26,8 @@ static hbool_t interface_initialize_g = FALSE; #define INTERFACE_INIT NULL static htri_t H5F_core_access(const char *name, - const H5F_access_t *access_parms, int mode, - H5F_search_t *key/*out*/); + const H5F_access_t *access_parms, int mode, + H5F_search_t *key/*out*/); static H5F_low_t *H5F_core_open(const char *name, const H5F_access_t *access_parms, uintn flags, H5F_search_t *key/*out*/); @@ -140,7 +140,7 @@ H5F_core_open(const char __unused__ *name, * * Errors: * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Wednesday, October 22, 1997 diff --git a/src/H5Ffamily.c b/src/H5Ffamily.c index d5d06eb..79a9314 100644 --- a/src/H5Ffamily.c +++ b/src/H5Ffamily.c @@ -36,8 +36,8 @@ static hbool_t interface_initialize_g = FALSE; (LF)->u.fam.memb_size.offset)) static htri_t H5F_fam_access(const char *name, - const H5F_access_t *access_parms, int mode, - H5F_search_t *key/*out*/); + const H5F_access_t *access_parms, int mode, + H5F_search_t *key/*out*/); static H5F_low_t *H5F_fam_open(const char *name, const H5F_access_t *access_parms, uintn flags, H5F_search_t *key/*out*/); diff --git a/src/H5Fistore.c b/src/H5Fistore.c index ccbc54f..c30a24f 100644 --- a/src/H5Fistore.c +++ b/src/H5Fistore.c @@ -442,9 +442,11 @@ H5F_istore_cmp3(H5F_t __unused__ *f, void *_lt_key, void *_udata, * the domain represented by UDATA doesn't intersect the domain * already represented by the B-tree. * - * Return: Non-negative on success (The address of leaf is returned through - * the ADDR argument. It is also added to the UDATA.) - * /Negative on failure + * Return: Success: Non-negative. The address of leaf is returned + * through the ADDR argument. It is also added + * to the UDATA. + * + * Failure: Negative * * Programmer: Robb Matzke * Tuesday, October 14, 1997 @@ -532,8 +534,8 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op, * called with the maximum stored chunk indices less than the * requested chunk indices. * - * Return: Non-negative on success (with information about the chunk returned - * through the UDATA argument.) /Negative on failure + * Return: Non-negative on success with information about the chunk + * returned through the UDATA argument. Negative on failure. * * Programmer: Robb Matzke * Thursday, October 9, 1997 @@ -1852,8 +1854,8 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout, * This function must be called before passing ISTORE to any of * the other indexed storage functions! * - * Return: Non-negative on success (with the ISTORE argument initialized and - * ready to write to an object header.) /Negative on failure + * Return: Non-negative on success (with the ISTORE argument initialized + * and ready to write to an object header). Negative on failure. * * Programmer: Robb Matzke * Tuesday, October 21, 1997 diff --git a/src/H5Flow.c b/src/H5Flow.c index cad16a6..01d2884 100644 --- a/src/H5Flow.c +++ b/src/H5Flow.c @@ -510,9 +510,12 @@ H5F_low_access(const H5F_low_class_t *type, const char *name, * end of file marker. A subclass can override this function by * providing its own allocation method. * - * Return: Non-negative on success (the address of the old end-of-file is - * returned through the ADDR argument and the logical size of the - * file has been extended by SIZE bytes.) /Negative on failure + * Return: Success: Non-negative. The address of the old + * end-of-file is returned through the ADDR + * argument and the logical size of the file has + * been extended by SIZE bytes. + * + * Failure: Negative. * * Programmer: Robb Matzke * Thursday, November 13, 1997 diff --git a/src/H5Fmpio.c b/src/H5Fmpio.c index 55080dc..f63ca07 100644 --- a/src/H5Fmpio.c +++ b/src/H5Fmpio.c @@ -100,19 +100,21 @@ static int H5F_mpio_Debug[256] = #endif static htri_t H5F_mpio_access(const char *name, - const H5F_access_t *access_parms, int mode, - H5F_search_t *key/*out*/); + const H5F_access_t *access_parms, int mode, + H5F_search_t *key/*out*/); static H5F_low_t *H5F_mpio_open(const char *name, const H5F_access_t *access_parms, uintn flags, H5F_search_t *key/*out*/); 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*/); + const haddr_t *addr, size_t size, + uint8 *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 haddr_t *addr, size_t size, + const uint8 *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); @@ -942,7 +944,7 @@ H5F_mpio_flush(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms) * Problems and limitations: * * Return: Non-negative on success (the haddr_t contains the converted - * value) /Negative on failure (the haddr_t is undefined) + * value). Negative on failure (the haddr_t is undefined). * * Programmer: * January 30, 1998 @@ -971,7 +973,7 @@ H5F_MPIOff_to_haddr( MPI_Offset mpi_off, haddr_t *addr ) * Problems and limitations: * * Return: Non-negative on success (the MPIOffset contains the converted - * value.) /Negative on failure (the MPIOffset is undefined.) + * value). Negative on failure (the MPIOffset is undefined). * * Programmer: * January 30, 1998 diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index ec37e56..fb821f0 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -612,8 +612,8 @@ 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*/); 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); + 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, const H5F_access_t *access_parms, uintn flags, H5F_search_t *key); diff --git a/src/H5Fsplit.c b/src/H5Fsplit.c index e63ed72..1b3eb8e 100644 --- a/src/H5Fsplit.c +++ b/src/H5Fsplit.c @@ -26,8 +26,8 @@ static hbool_t interface_initialize_g = FALSE; #define INTERFACE_INIT NULL static htri_t H5F_split_access(const char *name, - const H5F_access_t *access_parms, int mode, - H5F_search_t *key/*out*/); + const H5F_access_t *access_parms, int mode, + H5F_search_t *key/*out*/); static H5F_low_t *H5F_split_open(const char *name, const H5F_access_t *access_parms, uintn flags, H5F_search_t *key/*out*/); @@ -346,7 +346,7 @@ 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]; + char fullname[4096]; htri_t status; const char *ext; /*file extension*/ const H5F_low_class_t *meta_type = NULL; diff --git a/src/H5G.c b/src/H5G.c index dc62180..bf15f3d 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -480,8 +480,8 @@ H5Gunlink(hid_t loc_id, const char *name) * non-zero then all symbolic links are followed; otherwise all * links except the last component of the name are followed. * - * Return: Non-negative on success (with the fields of STATBUF (if - * non-null) initialized.) /Negative on failure + * Return: Non-negative on success, with the fields of STATBUF (if + * non-null) initialized. Negative on failure. * * Programmer: Robb Matzke * Monday, April 13, 1998 diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h index cfcc5be..616202e 100644 --- a/src/H5Vprivate.h +++ b/src/H5Vprivate.h @@ -43,8 +43,8 @@ hsize_t H5V_hyper_stride(intn n, const hsize_t *size, const hsize_t *total_size, const hssize_t *offset, hssize_t *stride); htri_t H5V_hyper_disjointp(intn n, const hssize_t *offset1, - const hsize_t *size1, const hssize_t *offset2, - const hsize_t *size2); + const hsize_t *size1, const hssize_t *offset2, + const hsize_t *size2); 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, diff --git a/src/H5public.h b/src/H5public.h index d5e5509..dfc8525 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -49,8 +49,9 @@ typedef int herr_t; /* * Boolean type. Successful return values are zero (false) or positive * (true). The typical true value is 1 but don't bet on it. Boolean - * functions can also fail, returning a negative value as described above. - * The proper way to test for truth is: + * functions cannot fail. Functions that return `htri_t' however return zero + * (false), positive (true), or negative (failure). The proper way to test + * for truth from a htri_t function is: * * if ((retval = H5Tcommitted(type))>0) { * printf("data type is committed\n"); @@ -60,8 +61,9 @@ typedef int herr_t; * printf("error determining whether data type is committed\n"); * } */ -typedef unsigned int hbool_t; /* For truly boolean values */ -typedef int htri_t; /* For values that might be TRUE/FALSE/FAIL */ +typedef unsigned int hbool_t; +typedef int htri_t; + /* * The sizes of file-objects in hdf5 have their own types defined here. On -- cgit v0.12