diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-07-10 21:19:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-07-10 21:19:18 (GMT) |
commit | 990fadfbe55353383639f0151990ec375fbe18cb (patch) | |
tree | a07f3b3215057bad7d46cbb9e26a4699b1fc8040 /src/H5FDstream.c | |
parent | 0c1c23245d103927c5d59c67b84526974e6217af (diff) | |
download | hdf5-990fadfbe55353383639f0151990ec375fbe18cb.zip hdf5-990fadfbe55353383639f0151990ec375fbe18cb.tar.gz hdf5-990fadfbe55353383639f0151990ec375fbe18cb.tar.bz2 |
[svn-r4181] Purpose:
Bug Fix, Code Cleanup, Code Optimization, etc.
Description:
Fold in the hyperslab speedups, clean up compile warnings and change a
few things from using 'unsigned' or 'hsize_t' to use 'size_t' instead.
Platforms tested:
FreeBSD 4.3 (hawkwind), Solaris 2.7 (arabica), Irix64 6.5 (modi4)
Diffstat (limited to 'src/H5FDstream.c')
-rw-r--r-- | src/H5FDstream.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/H5FDstream.c b/src/H5FDstream.c index e734014..b0ee868 100644 --- a/src/H5FDstream.c +++ b/src/H5FDstream.c @@ -161,10 +161,10 @@ static herr_t H5FD_stream_set_eoa (H5FD_t *_stream, haddr_t addr); static haddr_t H5FD_stream_get_eof (H5FD_t *_stream); static herr_t H5FD_stream_read (H5FD_t *_stream, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, - hsize_t size, void *buf); + size_t size, void *buf); static herr_t H5FD_stream_write (H5FD_t *_stream, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, - hsize_t size, const void *buf); + size_t size, const void *buf); /* The Stream VFD's class information structure */ static const H5FD_class_t H5FD_stream_g = @@ -1067,11 +1067,11 @@ static herr_t H5FD_stream_read (H5FD_t *_stream, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, - hsize_t size, + size_t size, void *buf /*out*/) { H5FD_stream_t *stream = (H5FD_stream_t *) _stream; - ssize_t nbytes; + size_t nbytes; FUNC_ENTER (H5FD_stream_read, FAIL); @@ -1095,8 +1095,8 @@ static herr_t H5FD_stream_read (H5FD_t *_stream, /* Read the part which is before the EOF marker */ if (addr < stream->eof) { - nbytes = (ssize_t) MIN (size, stream->eof - addr); - HDmemcpy (buf, stream->mem + addr, (size_t) nbytes); + nbytes = MIN (size, stream->eof - addr); + HDmemcpy (buf, stream->mem + addr, nbytes); size -= nbytes; addr += nbytes; buf = (char *) buf + nbytes; @@ -1105,7 +1105,7 @@ static herr_t H5FD_stream_read (H5FD_t *_stream, /* Read zeros for the part which is after the EOF markers */ if (size > 0) { - HDmemset (buf, 0, (size_t) size); + HDmemset (buf, 0, size); } FUNC_LEAVE (SUCCEED); @@ -1133,12 +1133,11 @@ static herr_t H5FD_stream_write (H5FD_t *_stream, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, - hsize_t size, + size_t size, const void *buf) { H5FD_stream_t *stream = (H5FD_stream_t *) _stream; - FUNC_ENTER (H5FD_stream_write, FAIL); assert (stream && stream->pub.cls); @@ -1189,7 +1188,7 @@ static herr_t H5FD_stream_write (H5FD_t *_stream, } /* Write from BUF to memory */ - HDmemcpy (stream->mem + addr, buf, (size_t) size); + HDmemcpy (stream->mem + addr, buf, size); stream->dirty = TRUE; FUNC_LEAVE (SUCCEED); |