1997-07-31 05:17:56 +08:00
|
|
|
/****************************************************************************
|
1998-10-14 05:28:53 +08:00
|
|
|
* NCSA HDF *
|
|
|
|
* Software Development Group *
|
|
|
|
* National Center for Supercomputing Applications *
|
|
|
|
* University of Illinois at Urbana-Champaign *
|
|
|
|
* 605 E. Springfield, Champaign IL 61820 *
|
|
|
|
* *
|
|
|
|
* For conditions of distribution and use, see the accompanying *
|
|
|
|
* hdf/COPYING file. *
|
|
|
|
* *
|
1997-07-31 05:17:56 +08:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file contains macros & information for file access
|
|
|
|
*/
|
|
|
|
|
1997-08-16 00:51:34 +08:00
|
|
|
#ifndef _H5Fprivate_H
|
|
|
|
#define _H5Fprivate_H
|
2000-10-10 15:43:38 +08:00
|
|
|
|
1997-08-16 00:51:34 +08:00
|
|
|
#include <H5Fpublic.h>
|
1997-07-31 05:17:56 +08:00
|
|
|
|
1997-10-21 07:14:35 +08:00
|
|
|
/* This is a near top-level header! Try not to include much! */
|
1999-08-11 04:21:32 +08:00
|
|
|
#include <H5FDpublic.h> /*file drivers */
|
1997-07-31 05:17:56 +08:00
|
|
|
|
2000-10-10 15:43:38 +08:00
|
|
|
typedef struct H5F_t H5F_t;
|
1998-02-20 02:19:48 +08:00
|
|
|
|
1997-08-16 00:51:34 +08:00
|
|
|
/*
|
|
|
|
* Encode and decode macros for file meta-data.
|
|
|
|
* Currently, all file meta-data is little-endian.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* For non-little-endian platforms, encode each byte by itself */
|
|
|
|
#ifdef WORDS_BIGENDIAN
|
1998-01-21 03:10:08 +08:00
|
|
|
# define INT16ENCODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
*(p) = (uint8_t)( (uintn)(i) & 0xff); (p)++; \
|
|
|
|
*(p) = (uint8_t)(((uintn)(i) >> 8) & 0xff); (p)++; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define UINT16ENCODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
*(p) = (uint8_t)( (i) & 0xff); (p)++; \
|
|
|
|
*(p) = (uint8_t)(((uintn)(i) >> 8) & 0xff); (p)++; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define INT32ENCODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
*(p) = (uint8_t)( (uint32_t)(i) & 0xff); (p)++; \
|
|
|
|
*(p) = (uint8_t)(((uint32_t)(i) >> 8) & 0xff); (p)++; \
|
|
|
|
*(p) = (uint8_t)(((uint32_t)(i) >> 16) & 0xff); (p)++; \
|
|
|
|
*(p) = (uint8_t)(((uint32_t)(i) >> 24) & 0xff); (p)++; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define UINT32ENCODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
*(p) = (uint8_t)( (i) & 0xff); (p)++; \
|
|
|
|
*(p) = (uint8_t)(((i) >> 8) & 0xff); (p)++; \
|
|
|
|
*(p) = (uint8_t)(((i) >> 16) & 0xff); (p)++; \
|
|
|
|
*(p) = (uint8_t)(((i) >> 24) & 0xff); (p)++; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define INT64ENCODE(p, n) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
int64_t _n = (n); \
|
1998-02-11 00:41:45 +08:00
|
|
|
size_t _i; \
|
1998-11-19 02:40:09 +08:00
|
|
|
uint8_t *_p = (uint8_t*)(p); \
|
|
|
|
for (_i=0; _i<sizeof(int64_t); _i++, _n>>=8) { \
|
|
|
|
*_p++ = (uint8_t)(_n & 0xff); \
|
1998-01-21 03:10:08 +08:00
|
|
|
} \
|
|
|
|
for (/*void*/; _i<8; _i++) { \
|
|
|
|
*_p++ = (n)<0 ? 0xff : 0; \
|
|
|
|
} \
|
1998-11-19 02:40:09 +08:00
|
|
|
(p) = (uint8_t*)(p)+8; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define UINT64ENCODE(p, n) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
uint64_t _n = (n); \
|
1998-02-11 00:41:45 +08:00
|
|
|
size_t _i; \
|
1998-11-19 02:40:09 +08:00
|
|
|
uint8_t *_p = (uint8_t*)(p); \
|
|
|
|
for (_i=0; _i<sizeof(uint64_t); _i++, _n>>=8) { \
|
|
|
|
*_p++ = (uint8_t)(_n & 0xff); \
|
1998-01-21 03:10:08 +08:00
|
|
|
} \
|
|
|
|
for (/*void*/; _i<8; _i++) { \
|
|
|
|
*_p++ = 0; \
|
|
|
|
} \
|
1998-11-19 02:40:09 +08:00
|
|
|
(p) = (uint8_t*)(p)+8; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1999-03-10 07:06:07 +08:00
|
|
|
/* DECODE converts little endian bytes pointed by p to integer values and store
|
|
|
|
* it in i. For signed values, need to do sign-extension when converting
|
|
|
|
* the last byte which carries the sign bit.
|
|
|
|
* The macros does not require i be of a certain byte sizes. It just requires
|
|
|
|
* i be big enough to hold the intended value range. E.g. INT16DECODE works
|
|
|
|
* correctly even if i is actually a 64bit int like in a Cray.
|
|
|
|
*/
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define INT16DECODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
(i) = (int16_t)((*(p) & 0xff)); (p)++; \
|
1999-03-10 07:06:07 +08:00
|
|
|
(i) |= (int16_t)(((*(p) & 0xff) << 8) | \
|
|
|
|
((*(p) & 0x80) ? ~0xffff : 0x0)); (p)++; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define UINT16DECODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
(i) = (uint16_t) (*(p) & 0xff); (p)++; \
|
|
|
|
(i) |= (uint16_t)((*(p) & 0xff) << 8); (p)++; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define INT32DECODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
(i) = ( *(p) & 0xff); (p)++; \
|
|
|
|
(i) |= ((int32_t)(*(p) & 0xff) << 8); (p)++; \
|
|
|
|
(i) |= ((int32_t)(*(p) & 0xff) << 16); (p)++; \
|
1999-03-10 07:06:07 +08:00
|
|
|
(i) |= ((int32_t)(((*(p) & 0xff) << 24) | \
|
|
|
|
((*(p) & 0x80) ? ~0xffffffff : 0x0))); (p)++; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define UINT32DECODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
(i) = (uint32_t)(*(p) & 0xff); (p)++; \
|
|
|
|
(i) |= ((uint32_t)(*(p) & 0xff) << 8); (p)++; \
|
|
|
|
(i) |= ((uint32_t)(*(p) & 0xff) << 16); (p)++; \
|
|
|
|
(i) |= ((uint32_t)(*(p) & 0xff) << 24); (p)++; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define INT64DECODE(p, n) { \
|
|
|
|
/* WE DON'T CHECK FOR OVERFLOW! */ \
|
1998-02-11 00:41:45 +08:00
|
|
|
size_t _i; \
|
1998-02-28 04:07:37 +08:00
|
|
|
n = 0; \
|
1998-01-21 03:10:08 +08:00
|
|
|
(p) += 8; \
|
1998-11-19 02:40:09 +08:00
|
|
|
for (_i=0; _i<sizeof(int64_t); _i++) { \
|
1998-02-28 04:07:37 +08:00
|
|
|
n = (n<<8) | *(--p); \
|
1998-01-21 03:10:08 +08:00
|
|
|
} \
|
|
|
|
(p) += 8; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define UINT64DECODE(p, n) { \
|
|
|
|
/* WE DON'T CHECK FOR OVERFLOW! */ \
|
1998-02-11 00:41:45 +08:00
|
|
|
size_t _i; \
|
1998-02-28 04:07:37 +08:00
|
|
|
n = 0; \
|
1998-01-21 03:10:08 +08:00
|
|
|
(p) += 8; \
|
1998-11-19 02:40:09 +08:00
|
|
|
for (_i=0; _i<sizeof(uint64_t); _i++) { \
|
1998-02-28 04:07:37 +08:00
|
|
|
n = (n<<8) | *(--p); \
|
1998-01-21 03:10:08 +08:00
|
|
|
} \
|
|
|
|
(p) += 8; \
|
1997-08-16 00:51:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
/* For little-endian platforms, make the compiler do the work */
|
1998-11-19 02:40:09 +08:00
|
|
|
# define INT16ENCODE(p, i) {*((int16_t*)(p))=(int16_t)(i);(p)+=2;}
|
|
|
|
# define UINT16ENCODE(p, i) {*((uint16_t*)(p))=(uint16_t)(i);(p)+=2;}
|
|
|
|
# define INT32ENCODE(p, i) {*((int32_t*)(p))=(int32_t)(i);(p)+=4;}
|
|
|
|
# define UINT32ENCODE(p, i) {*((uint32_t*)(p))=(uint32_t)(i);(p)+=4;}
|
1997-09-20 00:36:59 +08:00
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define INT64ENCODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
*((int64_t *)(p)) = (int64_t)(i); \
|
|
|
|
(p) += sizeof(int64_t); \
|
|
|
|
if (4==sizeof(int64_t)) { \
|
1998-01-21 03:10:08 +08:00
|
|
|
*(p)++ = (i)<0?0xff:0x00; \
|
|
|
|
*(p)++ = (i)<0?0xff:0x00; \
|
|
|
|
*(p)++ = (i)<0?0xff:0x00; \
|
|
|
|
*(p)++ = (i)<0?0xff:0x00; \
|
|
|
|
} \
|
1997-09-20 00:36:59 +08:00
|
|
|
}
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
# define UINT64ENCODE(p, i) { \
|
1998-11-19 02:40:09 +08:00
|
|
|
*((uint64_t *)(p)) = (uint64_t)(i); \
|
|
|
|
(p) += sizeof(uint64_t); \
|
|
|
|
if (4==sizeof(uint64_t)) { \
|
1998-01-21 03:10:08 +08:00
|
|
|
*(p)++ = 0x00; \
|
|
|
|
*(p)++ = 0x00; \
|
|
|
|
*(p)++ = 0x00; \
|
|
|
|
*(p)++ = 0x00; \
|
|
|
|
} \
|
1997-09-20 00:36:59 +08:00
|
|
|
}
|
|
|
|
|
1998-11-19 02:40:09 +08:00
|
|
|
# define INT16DECODE(p, i) {(i)=(int16_t)(*(const int16_t*)(p));(p)+=2;}
|
|
|
|
# define UINT16DECODE(p, i) {(i)=(uint16_t)(*(const uint16_t*)(p));(p)+=2;}
|
|
|
|
# define INT32DECODE(p, i) {(i)=(int32_t)(*(const int32_t*)(p));(p)+=4;}
|
|
|
|
# define UINT32DECODE(p, i) {(i)=(uint32_t)(*(const uint32_t*)(p));(p)+=4;}
|
|
|
|
# define INT64DECODE(p, i) {(i)=(int64_t)(*(const int64_t*)(p));(p)+=8;}
|
|
|
|
# define UINT64DECODE(p, i) {(i)=(uint64_t)(*(const uint64_t*)(p));(p)+=8;}
|
1997-08-16 00:51:34 +08:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
1998-01-21 03:10:08 +08:00
|
|
|
#define NBYTEENCODE(d, s, n) { HDmemcpy(d,s,n); p+=n }
|
1997-08-16 00:51:34 +08:00
|
|
|
|
1998-02-20 02:19:48 +08:00
|
|
|
/*
|
|
|
|
* Note: the NBYTEDECODE macro is backwards from the memcpy() routine, in
|
|
|
|
* the spirit of the other DECODE macros.
|
|
|
|
*/
|
1998-01-21 03:10:08 +08:00
|
|
|
#define NBYTEDECODE(s, d, n) { HDmemcpy(d,s,n); p+=n }
|
1997-08-16 00:51:34 +08:00
|
|
|
|
2000-10-10 15:43:38 +08:00
|
|
|
/* Address-related macros */
|
|
|
|
#define H5F_addr_overflow(X,Z) (HADDR_UNDEF==(X) || \
|
|
|
|
HADDR_UNDEF==(X)+(haddr_t)(Z) || \
|
|
|
|
(X)+(haddr_t)(Z)<(X))
|
|
|
|
#define H5F_addr_hash(X,M) ((unsigned)((X)%(M)))
|
|
|
|
#define H5F_addr_defined(X) (X!=HADDR_UNDEF)
|
|
|
|
#define H5F_addr_eq(X,Y) ((X)!=HADDR_UNDEF && \
|
|
|
|
(Y)!=HADDR_UNDEF && \
|
|
|
|
(X)==(Y))
|
|
|
|
#define H5F_addr_ne(X,Y) (!H5F_addr_eq((X),(Y)))
|
|
|
|
#define H5F_addr_lt(X,Y) ((X)!=HADDR_UNDEF && \
|
|
|
|
(Y)!=HADDR_UNDEF && \
|
|
|
|
(X)<(Y))
|
|
|
|
#define H5F_addr_le(X,Y) ((X)!=HADDR_UNDEF && \
|
|
|
|
(Y)!=HADDR_UNDEF && \
|
|
|
|
(X)<=(Y))
|
|
|
|
#define H5F_addr_gt(X,Y) ((X)!=HADDR_UNDEF && \
|
|
|
|
(Y)!=HADDR_UNDEF && \
|
|
|
|
(X)>(Y))
|
|
|
|
#define H5F_addr_ge(X,Y) ((X)!=HADDR_UNDEF && \
|
|
|
|
(Y)!=HADDR_UNDEF && \
|
|
|
|
(X)>=(Y))
|
|
|
|
#define H5F_addr_cmp(X,Y) (H5F_addr_eq(X,Y)?0: \
|
|
|
|
(H5F_addr_lt(X, Y)?-1:1))
|
|
|
|
#define H5F_addr_pow2(N) ((haddr_t)1<<(N))
|
|
|
|
|
|
|
|
/* size of size_t and off_t as they exist on disk */
|
|
|
|
#ifdef H5F_PACKAGE
|
|
|
|
#define H5F_SIZEOF_ADDR(F) ((F)->shared->fcpl->sizeof_addr)
|
|
|
|
#define H5F_SIZEOF_SIZE(F) ((F)->shared->fcpl->sizeof_size)
|
|
|
|
#else /* H5F_PACKAGE */
|
|
|
|
#define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F))
|
|
|
|
#define H5F_SIZEOF_SIZE(F) (H5F_sizeof_size(F))
|
|
|
|
#endif /* H5F_PACKAGE */
|
|
|
|
__DLL__ size_t H5F_sizeof_addr(H5F_t *f);
|
|
|
|
__DLL__ size_t H5F_sizeof_size(H5F_t *f);
|
|
|
|
|
|
|
|
/* Macros to encode/decode offset/length's for storing in the file */
|
|
|
|
#ifdef NOT_YET
|
|
|
|
#define H5F_ENCODE_OFFSET(f,p,o) (H5F_SIZEOF_ADDR(f)==4 ? UINT32ENCODE(p,o) \
|
|
|
|
: H5F_SIZEOF_ADDR(f)==8 ? UINT64ENCODE(p,o) \
|
|
|
|
: H5F_SIZEOF_ADDR(f)==2 ? UINT16ENCODE(p,o) \
|
|
|
|
: H5FPencode_unusual_offset(f,&(p),(uint8_t*)&(o)))
|
|
|
|
#else /* NOT_YET */
|
|
|
|
#define H5F_ENCODE_OFFSET(f,p,o) switch(H5F_SIZEOF_ADDR(f)) { \
|
|
|
|
case 4: UINT32ENCODE(p,o); break; \
|
|
|
|
case 8: UINT64ENCODE(p,o); break; \
|
|
|
|
case 2: UINT16ENCODE(p,o); break; \
|
|
|
|
}
|
|
|
|
#endif /* NOT_YET */
|
|
|
|
|
|
|
|
#define H5F_DECODE_OFFSET(f,p,o) switch (H5F_SIZEOF_ADDR (f)) { \
|
|
|
|
case 4: UINT32DECODE (p, o); break; \
|
|
|
|
case 8: UINT64DECODE (p, o); break; \
|
|
|
|
case 2: UINT16DECODE (p, o); break; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define H5F_ENCODE_LENGTH(f,p,l) switch(H5F_SIZEOF_SIZE(f)) { \
|
|
|
|
case 4: UINT32ENCODE(p,l); break; \
|
|
|
|
case 8: UINT64ENCODE(p,l); break; \
|
|
|
|
case 2: UINT16ENCODE(p,l); break; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define H5F_DECODE_LENGTH(f,p,l) switch(H5F_SIZEOF_SIZE(f)) { \
|
|
|
|
case 4: UINT32DECODE(p,l); break; \
|
|
|
|
case 8: UINT64DECODE(p,l); break; \
|
|
|
|
case 2: UINT16DECODE(p,l); break; \
|
|
|
|
}
|
1998-03-06 05:27:38 +08:00
|
|
|
|
1997-08-16 00:51:34 +08:00
|
|
|
/*
|
1998-03-05 00:20:23 +08:00
|
|
|
* File-creation property list.
|
1997-08-16 00:51:34 +08:00
|
|
|
*/
|
[svn-r139] ./src/*.[ch]
Removed the interface initialization argument from
FUNC_ENTER() and made it a locally-defined preprocessor
symbol, INTERFACE_INIT.
Changed `offset' to `address' and `length' to `size' in
documentation so it's more consistent. `Offset' still appears
occassionally when it refers to a byte offset within some
other data structure.
Moved interface termination function prototypes from public
header files to .c files and made them static.
./src/H5.c
./src/H5public.h
Added H5init() because it's possible that the predefined data
types are not initialized. This happens only if the first
call to the hdf5 library passes a predefined data type symbol
as an argument. There should be some way to fix this...
./src/H5A.c
./src/H5Aprivate.h
./src/H5Apublic.h
The free_func returns SUCCEED or FAIL, although the return
value is ignored by H5A. This is so we can use the various
H5*_close() functions to free things.
H5Ainc_ref() and H5Adec_ref() are no longer public. Many of
the other atom functions should also be made private, but I'll
save that for later...
Added additional template groups called H5_TEMPLATE_0 through
H5_TEMPLATE_7 that are used by the various template
subclasses.
Increased the number of bits used for atom groups to prevent
negative atoms.
./src/H5AC.c
./src/H5ACprivate.h
Changed H5AC_new() to H5AC_create() to make names more consistent.
./src/H5B.c
./src/H5Bprivate.h
Changed H5B_new() to H5B_create() to make names more consistent.
./src/H5C.c
./src/H5Cprivate.h
./src/H5Cpublic.h
Now supports multiple subclasses of templates, although it's
done with big switch statements. The default values for
templates are defined in the source file to which that
template belongs. This got rid of lots of needless
preprocessor constants.
Added H5Ccreate() to create a new template. Changed
H5C_release() to H5Cclose() to make the naming more
consistent.
./src/H5D.c
./src/H5Dprivate.h
./src/H5Dpublic.h
Enhanced to use the new dataset interface, and uses the enhanced
data type and data space interfaces, which haven't been
completely implemented. The dataset interface doesn't handle
non-contiguous storage, compression, or data type and space
conversions yet.
./src/H5F.c
./src/H5Fprivate.h
./src/H5Fpublic.h
Removed H5Fflush() since just calls H5F_flush(), which doesn't
do what the user would probably think it does, namely, flush
everything. It only flushes those things sitting in the H5AC
cache and the boot block.
Changed the `file_create_parms' field of H5F_low_t to just
`create_parms' since the `file' part is obvious.
./src/H5Fistore.c
Added some support for external files. Mostly just in the
file format and not supported much by the library yet. I need
to finish some dataset functions first.
Changed H5F_istore_new() to H5F_istore_create() to make names
more uniform across packages.
./src/H5Flow.c
Flushing a file causes the file to be physically extended to
the logical eof. This prevents H5F_open() from thinking a
file has been truncated. Most of the time the file will
already be that large, and when it isn't Unix will often just
allocate the final block anyway.
./src/H5G.c
./src/H5Gent.c
./src/H5Gnode.c
./src/H5Gpkg.h
./src/H5Gprivate.h
./src/H5Gstab.c
Removed H5G_basename()
Removed (temporarily) data type information from symbol table
entries and renamed H5G_CACHED_SDATA to H5G_CACHED_SDSPACE to
reflect that it's a simple data space and has nothing to do
with raw data.
Changed H5G_node_new() to H5G_node_create() and H5G_stab_new()
to H5G_stab_create() to make names more uniform across
packages.
Fixed an undefined address bug that happens when H5G_node_debug()
program doesn't pass enough info to H5G_node_load().
./src/H5H.c
./src/H5Hprivate.h
Changed H5H_new() to H5H_create() to make the names more
uniform across packages.
./src/H5M.c
./src/H5Mprivate.h
./src/H5Mpublic.h
Nulled all the create functions. Most of the other callbacks
are to public functions. Removed H5Mcreate().
Changed hobjtype_t to group_t since it has to be the same
thing anyway.
./src/H5O.c
./src/H5Oprivate.h
./src/H5Osdim.c
./src/H5Osdtyp.c
Changed H5O_SIM_DIM to H5O_SDSPACE (simple data space) since
`simple data space' is its official name, not `simple
dimensions'. Will eventually add H5O_CDSPACE for comples data
spaces. Changed _sim_dim_ to _dspace_.
Replaced H5O_SIM_DTYPE and the compound data type messages
with a single H5O_DTYPE message. Changed _sim_dtype_ to _dtype_.
Changed H5O_STD_STORE to H5O_CSTORE (contiguous storage) since
contiguous storage is not necessarily standard. Changed
_std_store_ to _cstore_ in H5Ocstore.c
Added the H5O_EFL (external file list) message.
Changed H5O_new() to H5O_create() to make names more uniform
across packages.
./src/H5Oefl.c NEW
External file list message for specifying which non-hdf5 files
contain raw data for a dataset.
./src/H5P.c
./src/H5Pprivate.h
./src/H5Ppublic.h
Renamed and moved data structures to make the names conform to
our naming scheme.
./src/H5T.c
./src/H5Tprivate.h
./src/H5Tpublic.h
./src/H5Tpkg.h NEW
Data structures redesigned to be more flexible. The interface
was redesigned to make it more regular and to make some names
more uniform across packages.
./src/H5detect.c
Output was changed to produce a file that conforms to the hdf5
coding standard.
./src/Makefile.in
Generates H5Tinit.c by running H5detect.
./src/debug.c
Moved command argument processing.
1997-12-11 06:41:07 +08:00
|
|
|
typedef struct H5F_create_t {
|
1998-04-09 05:43:02 +08:00
|
|
|
hsize_t userblock_size; /* Size of the file user block in bytes */
|
1998-01-21 03:10:08 +08:00
|
|
|
intn sym_leaf_k; /* 1/2 rank for symbol table leaf nodes */
|
|
|
|
intn btree_k[8]; /* 1/2 rank for btree internal nodes */
|
|
|
|
size_t sizeof_addr; /* Number of bytes in an address */
|
|
|
|
size_t sizeof_size; /* Number of bytes for obj sizes */
|
|
|
|
intn bootblock_ver; /* Version # of the bootblock */
|
|
|
|
intn freespace_ver; /* Version # of the free-space information*/
|
|
|
|
intn objectdir_ver; /* Version # of the object directory format*/
|
|
|
|
intn sharedheader_ver;/* Version # of the shared header format */
|
[svn-r139] ./src/*.[ch]
Removed the interface initialization argument from
FUNC_ENTER() and made it a locally-defined preprocessor
symbol, INTERFACE_INIT.
Changed `offset' to `address' and `length' to `size' in
documentation so it's more consistent. `Offset' still appears
occassionally when it refers to a byte offset within some
other data structure.
Moved interface termination function prototypes from public
header files to .c files and made them static.
./src/H5.c
./src/H5public.h
Added H5init() because it's possible that the predefined data
types are not initialized. This happens only if the first
call to the hdf5 library passes a predefined data type symbol
as an argument. There should be some way to fix this...
./src/H5A.c
./src/H5Aprivate.h
./src/H5Apublic.h
The free_func returns SUCCEED or FAIL, although the return
value is ignored by H5A. This is so we can use the various
H5*_close() functions to free things.
H5Ainc_ref() and H5Adec_ref() are no longer public. Many of
the other atom functions should also be made private, but I'll
save that for later...
Added additional template groups called H5_TEMPLATE_0 through
H5_TEMPLATE_7 that are used by the various template
subclasses.
Increased the number of bits used for atom groups to prevent
negative atoms.
./src/H5AC.c
./src/H5ACprivate.h
Changed H5AC_new() to H5AC_create() to make names more consistent.
./src/H5B.c
./src/H5Bprivate.h
Changed H5B_new() to H5B_create() to make names more consistent.
./src/H5C.c
./src/H5Cprivate.h
./src/H5Cpublic.h
Now supports multiple subclasses of templates, although it's
done with big switch statements. The default values for
templates are defined in the source file to which that
template belongs. This got rid of lots of needless
preprocessor constants.
Added H5Ccreate() to create a new template. Changed
H5C_release() to H5Cclose() to make the naming more
consistent.
./src/H5D.c
./src/H5Dprivate.h
./src/H5Dpublic.h
Enhanced to use the new dataset interface, and uses the enhanced
data type and data space interfaces, which haven't been
completely implemented. The dataset interface doesn't handle
non-contiguous storage, compression, or data type and space
conversions yet.
./src/H5F.c
./src/H5Fprivate.h
./src/H5Fpublic.h
Removed H5Fflush() since just calls H5F_flush(), which doesn't
do what the user would probably think it does, namely, flush
everything. It only flushes those things sitting in the H5AC
cache and the boot block.
Changed the `file_create_parms' field of H5F_low_t to just
`create_parms' since the `file' part is obvious.
./src/H5Fistore.c
Added some support for external files. Mostly just in the
file format and not supported much by the library yet. I need
to finish some dataset functions first.
Changed H5F_istore_new() to H5F_istore_create() to make names
more uniform across packages.
./src/H5Flow.c
Flushing a file causes the file to be physically extended to
the logical eof. This prevents H5F_open() from thinking a
file has been truncated. Most of the time the file will
already be that large, and when it isn't Unix will often just
allocate the final block anyway.
./src/H5G.c
./src/H5Gent.c
./src/H5Gnode.c
./src/H5Gpkg.h
./src/H5Gprivate.h
./src/H5Gstab.c
Removed H5G_basename()
Removed (temporarily) data type information from symbol table
entries and renamed H5G_CACHED_SDATA to H5G_CACHED_SDSPACE to
reflect that it's a simple data space and has nothing to do
with raw data.
Changed H5G_node_new() to H5G_node_create() and H5G_stab_new()
to H5G_stab_create() to make names more uniform across
packages.
Fixed an undefined address bug that happens when H5G_node_debug()
program doesn't pass enough info to H5G_node_load().
./src/H5H.c
./src/H5Hprivate.h
Changed H5H_new() to H5H_create() to make the names more
uniform across packages.
./src/H5M.c
./src/H5Mprivate.h
./src/H5Mpublic.h
Nulled all the create functions. Most of the other callbacks
are to public functions. Removed H5Mcreate().
Changed hobjtype_t to group_t since it has to be the same
thing anyway.
./src/H5O.c
./src/H5Oprivate.h
./src/H5Osdim.c
./src/H5Osdtyp.c
Changed H5O_SIM_DIM to H5O_SDSPACE (simple data space) since
`simple data space' is its official name, not `simple
dimensions'. Will eventually add H5O_CDSPACE for comples data
spaces. Changed _sim_dim_ to _dspace_.
Replaced H5O_SIM_DTYPE and the compound data type messages
with a single H5O_DTYPE message. Changed _sim_dtype_ to _dtype_.
Changed H5O_STD_STORE to H5O_CSTORE (contiguous storage) since
contiguous storage is not necessarily standard. Changed
_std_store_ to _cstore_ in H5Ocstore.c
Added the H5O_EFL (external file list) message.
Changed H5O_new() to H5O_create() to make names more uniform
across packages.
./src/H5Oefl.c NEW
External file list message for specifying which non-hdf5 files
contain raw data for a dataset.
./src/H5P.c
./src/H5Pprivate.h
./src/H5Ppublic.h
Renamed and moved data structures to make the names conform to
our naming scheme.
./src/H5T.c
./src/H5Tprivate.h
./src/H5Tpublic.h
./src/H5Tpkg.h NEW
Data structures redesigned to be more flexible. The interface
was redesigned to make it more regular and to make some names
more uniform across packages.
./src/H5detect.c
Output was changed to produce a file that conforms to the hdf5
coding standard.
./src/Makefile.in
Generates H5Tinit.c by running H5detect.
./src/debug.c
Moved command argument processing.
1997-12-11 06:41:07 +08:00
|
|
|
} H5F_create_t;
|
1997-08-16 00:51:34 +08:00
|
|
|
|
1998-02-06 11:00:35 +08:00
|
|
|
/*
|
1998-03-05 00:20:23 +08:00
|
|
|
* File-access property list.
|
1998-02-06 11:00:35 +08:00
|
|
|
*/
|
|
|
|
typedef struct H5F_access_t {
|
1998-09-24 23:51:05 +08:00
|
|
|
intn mdc_nelmts; /* Size of meta data cache (elements) */
|
|
|
|
intn rdcc_nelmts; /* Size of raw data chunk cache (elmts) */
|
1998-05-22 23:05:53 +08:00
|
|
|
size_t rdcc_nbytes; /* Size of raw data chunk cache (bytes) */
|
2000-04-21 00:36:38 +08:00
|
|
|
double rdcc_w0; /* Preempt read chunks first? [0.0..1.0]*/
|
1998-06-10 22:43:15 +08:00
|
|
|
hsize_t threshold; /* Threshold for alignment */
|
|
|
|
hsize_t alignment; /* Alignment */
|
2000-09-27 06:50:18 +08:00
|
|
|
size_t meta_block_size; /* Minimum metadata allocation block size (when aggregating metadata allocations) */
|
|
|
|
hsize_t sieve_buf_size; /* Maximum sieve buffer size (when data sieving is allowed by file driver) */
|
1999-08-11 04:21:32 +08:00
|
|
|
uintn gc_ref; /* Garbage-collect references? */
|
|
|
|
hid_t driver_id; /* File driver ID */
|
|
|
|
void *driver_info; /* File driver specific information */
|
1998-02-06 11:00:35 +08:00
|
|
|
} H5F_access_t;
|
|
|
|
|
1999-02-21 00:18:51 +08:00
|
|
|
/* Mount property list */
|
|
|
|
typedef struct H5F_mprop_t {
|
|
|
|
hbool_t local; /* Are absolute symlinks local to file? */
|
|
|
|
} H5F_mprop_t;
|
|
|
|
|
2000-10-10 15:43:38 +08:00
|
|
|
/* library variables */
|
|
|
|
__DLLVAR__ const H5F_create_t H5F_create_dflt;
|
|
|
|
__DLLVAR__ H5F_access_t H5F_access_dflt;
|
|
|
|
__DLLVAR__ const H5F_mprop_t H5F_mount_dflt;
|
1997-07-31 05:17:56 +08:00
|
|
|
|
1998-10-02 02:56:51 +08:00
|
|
|
/* Forward declarations for prototypes arguments */
|
|
|
|
struct H5O_layout_t;
|
|
|
|
struct H5O_efl_t;
|
|
|
|
struct H5O_pline_t;
|
|
|
|
struct H5O_fill_t;
|
1998-10-09 01:13:14 +08:00
|
|
|
struct H5G_entry_t;
|
2000-10-10 15:43:38 +08:00
|
|
|
struct H5S_t;
|
1998-09-02 06:42:00 +08:00
|
|
|
|
1997-07-31 05:17:56 +08:00
|
|
|
/* Private functions, not part of the publicly documented API */
|
1999-02-02 23:52:59 +08:00
|
|
|
__DLL__ herr_t H5F_init(void);
|
2000-10-10 15:43:38 +08:00
|
|
|
__DLL__ uintn H5F_get_intent(H5F_t *f);
|
2000-10-11 03:55:09 +08:00
|
|
|
__DLL__ hid_t H5F_get_driver_id(H5F_t *f);
|
1997-07-31 05:17:56 +08:00
|
|
|
|
1998-01-17 03:52:04 +08:00
|
|
|
/* Functions that operate on array storage */
|
1999-02-02 23:52:59 +08:00
|
|
|
__DLL__ herr_t H5F_arr_create(H5F_t *f,
|
1999-01-22 02:33:39 +08:00
|
|
|
struct H5O_layout_t *layout /*in,out*/);
|
1999-08-11 04:21:32 +08:00
|
|
|
__DLL__ herr_t H5F_arr_read (H5F_t *f, hid_t dxpl_id,
|
1999-01-22 02:33:39 +08:00
|
|
|
const struct H5O_layout_t *layout,
|
|
|
|
const struct H5O_pline_t *pline,
|
|
|
|
const struct H5O_fill_t *fill,
|
|
|
|
const struct H5O_efl_t *efl,
|
|
|
|
const hsize_t _hslab_size[],
|
|
|
|
const hsize_t mem_size[],
|
|
|
|
const hssize_t mem_offset[],
|
|
|
|
const hssize_t file_offset[], void *_buf/*out*/);
|
1999-08-11 04:21:32 +08:00
|
|
|
__DLL__ herr_t H5F_arr_write (H5F_t *f, hid_t dxpl_id,
|
1999-01-22 02:33:39 +08:00
|
|
|
const struct H5O_layout_t *layout,
|
|
|
|
const struct H5O_pline_t *pline,
|
|
|
|
const struct H5O_fill_t *fill,
|
|
|
|
const struct H5O_efl_t *efl,
|
|
|
|
const hsize_t _hslab_size[],
|
|
|
|
const hsize_t mem_size[],
|
|
|
|
const hssize_t mem_offset[],
|
|
|
|
const hssize_t file_offset[], const void *_buf);
|
1998-01-17 03:52:04 +08:00
|
|
|
|
2000-09-29 03:12:43 +08:00
|
|
|
/* Functions that operate on blocks of bytes wrt boot block */
|
2000-10-25 02:18:09 +08:00
|
|
|
__DLL__ herr_t H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size,
|
1999-08-11 04:21:32 +08:00
|
|
|
hid_t dxpl_id, void *buf/*out*/);
|
2000-09-01 03:26:42 +08:00
|
|
|
__DLL__ herr_t H5F_block_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
|
|
|
|
hsize_t size, hid_t dxpl_id, const void *buf);
|
1997-11-14 22:42:14 +08:00
|
|
|
|
2000-10-10 15:43:38 +08:00
|
|
|
/* Functions that operate on byte sequences */
|
|
|
|
__DLL__ herr_t H5F_seq_read(H5F_t *f, hid_t dxpl_id,
|
|
|
|
const struct H5O_layout_t *layout, const struct H5O_pline_t *pline,
|
|
|
|
const struct H5O_fill_t *fill, const struct H5O_efl_t *efl,
|
|
|
|
const struct H5S_t *file_space, size_t elmt_size, hsize_t seq_len,
|
2000-10-26 02:54:24 +08:00
|
|
|
hssize_t file_offset, void *_buf/*out*/);
|
2000-10-10 15:43:38 +08:00
|
|
|
__DLL__ herr_t H5F_seq_write (H5F_t *f, hid_t dxpl_id,
|
|
|
|
const struct H5O_layout_t *layout, const struct H5O_pline_t *pline,
|
|
|
|
const struct H5O_fill_t *fill, const struct H5O_efl_t *efl,
|
|
|
|
const struct H5S_t *file_space, size_t elmt_size, hsize_t seq_len,
|
2000-10-26 02:54:24 +08:00
|
|
|
hssize_t file_offset, const void *_buf);
|
1999-07-29 03:37:35 +08:00
|
|
|
|
2000-10-10 15:43:38 +08:00
|
|
|
|
|
|
|
/* Functions that operate on indexed storage */
|
|
|
|
__DLL__ hsize_t H5F_istore_allocated(H5F_t *f, int ndims, haddr_t addr);
|
|
|
|
__DLL__ herr_t H5F_istore_dump_btree(H5F_t *f, FILE *stream, int ndims,
|
|
|
|
haddr_t addr);
|
|
|
|
|
|
|
|
/* Functions for allocation/releasing chunks */
|
|
|
|
__DLL__ void * H5F_istore_chunk_free(void *chunk);
|
|
|
|
|
|
|
|
/* Address-related functions */
|
1999-07-29 02:25:43 +08:00
|
|
|
__DLL__ void H5F_addr_encode(H5F_t *, uint8_t**/*in,out*/, haddr_t);
|
|
|
|
__DLL__ void H5F_addr_decode(H5F_t *, const uint8_t**/*in,out*/,
|
|
|
|
haddr_t*/*out*/);
|
|
|
|
__DLL__ herr_t H5F_addr_pack(H5F_t UNUSED *f, haddr_t *addr_p/*out*/,
|
1999-02-19 03:38:45 +08:00
|
|
|
const unsigned long objno[2]);
|
1997-10-23 06:08:14 +08:00
|
|
|
|
1997-08-16 00:51:34 +08:00
|
|
|
#endif
|