summaryrefslogtreecommitdiffstats
path: root/src/H5Fspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fspace.c')
-rw-r--r--src/H5Fspace.c50
1 files changed, 19 insertions, 31 deletions
diff --git a/src/H5Fspace.c b/src/H5Fspace.c
index 3d969f9..91b70cf 100644
--- a/src/H5Fspace.c
+++ b/src/H5Fspace.c
@@ -26,54 +26,44 @@
/* Module Setup */
/****************/
-#include "H5Fmodule.h" /* This source code file is part of the H5F module */
-
+#include "H5Fmodule.h" /* This source code file is part of the H5F module */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5F__alloc
*
@@ -95,7 +85,7 @@
haddr_t
H5F__alloc(H5F_t *f, H5F_mem_t type, hsize_t size, haddr_t *frag_addr, hsize_t *frag_size)
{
- haddr_t ret_value = 0; /* Return value */
+ haddr_t ret_value = 0; /* Return value */
FUNC_ENTER_PACKAGE
@@ -107,32 +97,32 @@ H5F__alloc(H5F_t *f, H5F_mem_t type, hsize_t size, haddr_t *frag_addr, hsize_t *
HDassert(size > 0);
/* Check whether the file can use temporary addresses */
- if(f->shared->use_tmp_space) {
- haddr_t eoa; /* Current EOA for the file */
+ if (f->shared->use_tmp_space) {
+ haddr_t eoa; /* Current EOA for the file */
/* Get the EOA for the file */
- if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
+ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa")
/* Check for overlapping into file's temporary allocation space */
- if(H5F_addr_gt((eoa + size), f->shared->tmp_addr))
- HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space")
+ if (H5F_addr_gt((eoa + size), f->shared->tmp_addr))
+ HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, HADDR_UNDEF,
+ "'normal' file space allocation request will overlap into 'temporary' file space")
} /* end if */
/* Call the file driver 'alloc' routine */
ret_value = H5FD_alloc(f->shared->lf, type, f, size, frag_addr, frag_size);
- if(!H5F_addr_defined(ret_value))
+ if (!H5F_addr_defined(ret_value))
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, HADDR_UNDEF, "file driver 'alloc' request failed")
/* Mark EOA dirty */
- if(H5F_eoa_dirty(f) < 0)
+ if (H5F_eoa_dirty(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, HADDR_UNDEF, "unable to mark EOA as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5F__free
*
@@ -154,7 +144,7 @@ done:
herr_t
H5F__free(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -166,18 +156,17 @@ H5F__free(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size)
HDassert(size > 0);
/* Call the file driver 'free' routine */
- if(H5FD_free(f->shared->lf, type, f, addr, size) < 0)
+ if (H5FD_free(f->shared->lf, type, f, addr, size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "file driver 'free' request failed")
/* Mark EOA dirty */
- if(H5F_eoa_dirty(f) < 0)
+ if (H5F_eoa_dirty(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark EOA as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__free() */
-
/*-------------------------------------------------------------------------
* Function: H5F__try_extend
*
@@ -199,7 +188,7 @@ done:
htri_t
H5F__try_extend(H5F_t *f, H5FD_mem_t type, haddr_t blk_end, hsize_t extra_requested)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_PACKAGE
@@ -211,7 +200,7 @@ H5F__try_extend(H5F_t *f, H5FD_mem_t type, haddr_t blk_end, hsize_t extra_reques
HDassert(extra_requested > 0);
/* Extend the object by extending the underlying file */
- if((ret_value = H5FD_try_extend(f->shared->lf, type, f, blk_end, extra_requested)) < 0)
+ if ((ret_value = H5FD_try_extend(f->shared->lf, type, f, blk_end, extra_requested)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTEXTEND, FAIL, "driver try extend request failed")
/* H5FD_try_extend() updates driver message and marks the superblock
@@ -221,4 +210,3 @@ H5F__try_extend(H5F_t *f, H5FD_mem_t type, haddr_t blk_end, hsize_t extra_reques
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__try_extend() */
-