summaryrefslogtreecommitdiffstats
path: root/src/H5FDsec2.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
commit6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch)
tree5a7a112fe7a8a98c6fecb45b513789d15962eb3d /src/H5FDsec2.c
parent6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff)
downloadhdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2
[svn-r11245] Purpose:
Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r--src/H5FDsec2.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 41c9e62..f45deb1 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -119,7 +119,7 @@ typedef struct H5FD_sec2_t {
/*
* These macros check for overflow of various quantities. These macros
* assume that file_offset_t is signed and haddr_t and size_t are unsigned.
- *
+ *
* ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
* is too large to be represented by the second argument
* of the file seek function.
@@ -196,7 +196,7 @@ NAME
H5FD_sec2_init_interface -- Initialize interface-specific information
USAGE
herr_t H5FD_sec2_init_interface()
-
+
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -280,7 +280,7 @@ H5FD_sec2_term(void)
* Purpose: Modify the file access property list to use the H5FD_SEC2
* driver defined in this source file. There are no driver
* specific properties.
- *
+ *
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
@@ -298,7 +298,7 @@ H5Pset_fapl_sec2(hid_t fapl_id)
FUNC_ENTER_API(H5Pset_fapl_sec2, FAIL)
H5TRACE1("e","i",fapl_id);
-
+
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
@@ -632,27 +632,27 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_get_handle
- *
+ *
* Purpose: Returns the file handle of sec2 file driver.
- *
+ *
* Returns: Non-negative if succeed or negative if fails.
- *
+ *
* Programmer: Raymond Lu
* Sept. 16, 2002
- *
+ *
* Modifications:
*
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
-static herr_t
+static herr_t
H5FD_sec2_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void** file_handle)
-{
+{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED;
-
+
FUNC_ENTER_NOAPI(H5FD_sec2_get_handle, FAIL)
-
+
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
*file_handle = &(file->fd);
@@ -689,7 +689,7 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, hadd
H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
ssize_t nbytes;
herr_t ret_value=SUCCEED; /* Return value */
-
+
FUNC_ENTER_NOAPI(H5FD_sec2_read, FAIL)
assert(file && file->pub.cls);
@@ -731,7 +731,7 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, hadd
addr += (haddr_t)nbytes;
buf = (char*)buf + nbytes;
}
-
+
/* Update current position */
file->pos = addr;
file->op = OP_READ;
@@ -773,20 +773,20 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had
H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
ssize_t nbytes;
herr_t ret_value=SUCCEED; /* Return value */
-
+
FUNC_ENTER_NOAPI(H5FD_sec2_write, FAIL)
assert(file && file->pub.cls);
assert(buf);
/* Check for overflow conditions */
- if (HADDR_UNDEF==addr)
+ if (HADDR_UNDEF==addr)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined")
if (REGION_OVERFLOW(addr, size))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow")
if (addr+size>file->eoa)
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow")
-
+
/* Seek to the correct location */
if ((addr!=file->pos || OP_WRITE!=file->op) &&
file_seek(file->fd, (file_offset_t)addr, SEEK_SET)<0)
@@ -810,7 +810,7 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had
addr += (haddr_t)nbytes;
buf = (const char*)buf + nbytes;
}
-
+
/* Update current position and eof */
file->pos = addr;
file->op = OP_WRITE;