summaryrefslogtreecommitdiffstats
path: root/src/H5Flow.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-01-07 17:14:26 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-01-07 17:14:26 (GMT)
commit159fa7a232e1961940b83f035f4c27338d26337e (patch)
treeb7344e9cfaadbbec3bc3a0576df8c264debb8239 /src/H5Flow.c
parent1d17defdfc977c063c7ff20b5868bef9a76e5d9a (diff)
downloadhdf5-159fa7a232e1961940b83f035f4c27338d26337e.zip
hdf5-159fa7a232e1961940b83f035f4c27338d26337e.tar.gz
hdf5-159fa7a232e1961940b83f035f4c27338d26337e.tar.bz2
[svn-r151] Changes since 19980105
---------------------- ./config/freebsd2.2.1 ./config/linux Added -UH5O_DEBUG to the debug flags. Turn this on to get lots of lines on stderr to show what objects are opened and closed. ./src/H5C.o ./src/H5Cpublic.h ./test/dsets.c ./test/tfile.c Split H5Cget_prop() and H5Cset_prop() into functions for each property. ./src/H5D.c ./src/H5Dpublic.h ./src/H5Gstab.c ./src/H5O.c ./src/H5Ocont.c ./src/H5Ocstore.c ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Oistore.c ./src/H5Oname.c ./src/H5Onull.c ./src/H5Oprivate.h ./src/H5Osdspace.c ./src/H5Ostab.c ./src/H5P.c ./src/istore.c ./test/tohdr.c Object header functions now understand constant vs. non-constant messages. ./src/H5F.c ./src/H5Fprivate.h The file OID can be closed before other OID's. ./src/H5Flow.c H5F_addr_defined() is a macro in this file. ./src/H5G.c ./src/H5Gpublic.h ./test/tstab.c A current working group cannot be deleted. ./src/H5Gent.c ./src/H5Gpkg.h Removed unused functionality. ./src/H5public.h Includes <sys/types.h> for size_t.
Diffstat (limited to 'src/H5Flow.c')
-rw-r--r--src/H5Flow.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/H5Flow.c b/src/H5Flow.c
index 9cfb51f..3871aca 100644
--- a/src/H5Flow.c
+++ b/src/H5Flow.c
@@ -18,6 +18,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#define addr_defined(X) (-1!=(X)->offset && (X)->offset>=0)
#define PABLO_MASK H5F_low
static hbool_t interface_initialize_g = FALSE;
@@ -167,7 +168,7 @@ H5F_low_read (H5F_low_t *lf, const haddr_t *addr, size_t size,
FUNC_ENTER (H5F_low_read, FAIL);
assert (lf && lf->type);
- assert (addr && H5F_addr_defined (addr));
+ assert (addr && addr_defined (addr));
assert (buf);
if (lf->type->read) {
@@ -217,7 +218,7 @@ H5F_low_write (H5F_low_t *lf, const haddr_t *addr, size_t size,
FUNC_ENTER (H5F_low_write, FAIL);
assert (lf && lf->type);
- assert (addr && H5F_addr_defined (addr));
+ assert (addr && addr_defined (addr));
assert (buf);
/* Extend the file eof marker if we write past it */
@@ -277,7 +278,7 @@ H5F_low_flush (H5F_low_t *lf)
/* Make sure the last block of the file has been allocated on disk */
H5F_addr_reset (&last_byte);
- if (H5F_addr_defined (&(lf->eof)) && H5F_addr_gt (&(lf->eof), &last_byte)) {
+ if (addr_defined (&(lf->eof)) && H5F_addr_gt (&(lf->eof), &last_byte)) {
last_byte = lf->eof;
last_byte.offset -= 1;
if (H5F_low_read (lf, &last_byte, 1, buf)>=0) {
@@ -472,7 +473,7 @@ H5F_low_seteof (H5F_low_t *lf, const haddr_t *addr)
FUNC_ENTER (H5F_low_seteof, FAIL);
assert (lf);
- assert (addr && H5F_addr_defined (addr));
+ assert (addr && addr_defined (addr));
lf->eof = *addr;
@@ -503,8 +504,8 @@ H5F_addr_cmp (const haddr_t *a1, const haddr_t *a2)
{
FUNC_ENTER (H5F_addr_cmp, FAIL);
- assert (a1 && H5F_addr_defined (a1));
- assert (a2 && H5F_addr_defined (a2));
+ assert (a1 && addr_defined (a1));
+ assert (a2 && addr_defined (a2));
if (a1->offset<a2->offset) HRETURN (-1);
if (a1->offset>a2->offset) HRETURN (1);
@@ -556,7 +557,7 @@ hbool_t
H5F_addr_defined (const haddr_t *addr)
{
FUNC_ENTER (H5F_addr_defined, FAIL);
- FUNC_LEAVE (-1!=addr->offset && addr->offset>=0);
+ FUNC_LEAVE (addr_defined (addr));
}
@@ -632,7 +633,7 @@ H5F_addr_encode (H5F_t *f, uint8 **pp, const haddr_t *addr)
assert (pp && *pp);
assert (addr);
- if (H5F_addr_defined (addr)) {
+ if (addr_defined (addr)) {
tmp = *addr;
for (i=0; i<H5F_SIZEOF_ADDR (f); i++) {
*(*pp)++ = tmp.offset & 0xff;
@@ -719,7 +720,7 @@ H5F_addr_print (FILE *stream, const haddr_t *addr)
assert (stream);
assert (addr);
- if (H5F_addr_defined (addr)) {
+ if (addr_defined (addr)) {
/*
* It would be nice if we could use the `%Lu', `%llu', or `%qu', but
* we don't know which is supported. So we split the address into a
@@ -784,7 +785,7 @@ H5F_addr_pow2 (uintn n, haddr_t *addr/*out*/)
void
H5F_addr_inc (haddr_t *addr/*in,out*/, size_t inc)
{
- assert (addr && H5F_addr_defined (addr));
+ assert (addr && addr_defined (addr));
assert (addr->offset<=addr->offset+inc);
addr->offset += inc;
}
@@ -807,8 +808,8 @@ H5F_addr_inc (haddr_t *addr/*in,out*/, size_t inc)
void
H5F_addr_add (haddr_t *a1/*in,out*/, const haddr_t *a2)
{
- assert (a1 && H5F_addr_defined (a1));
- assert (a2 && H5F_addr_defined (a2));
+ assert (a1 && addr_defined (a1));
+ assert (a2 && addr_defined (a2));
a1->offset += a2->offset;
}
@@ -833,7 +834,7 @@ H5F_addr_add (haddr_t *a1/*in,out*/, const haddr_t *a2)
uintn
H5F_addr_hash (const haddr_t *addr, uintn mod)
{
- assert (addr && H5F_addr_defined (addr));
+ assert (addr && addr_defined (addr));
assert (mod>0);
return addr->offset % mod; /*ignore file number*/