summaryrefslogtreecommitdiffstats
path: root/src/H5HFbtree2.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-06 19:23:59 (GMT)
committerGitHub <noreply@github.com>2023-06-06 19:23:59 (GMT)
commit3c05dd74b865135ee7b0dcf0c38d5df85c6d95d8 (patch)
tree0ca6fc1d353505daebfe7813d17f05053f52bd9c /src/H5HFbtree2.c
parent2384a731763a7ceb11e39d48cc0f6991d908389e (diff)
downloadhdf5-3c05dd74b865135ee7b0dcf0c38d5df85c6d95d8.zip
hdf5-3c05dd74b865135ee7b0dcf0c38d5df85c6d95d8.tar.gz
hdf5-3c05dd74b865135ee7b0dcf0c38d5df85c6d95d8.tar.bz2
Move encode/decode macros to a new header (#3040)
Moves the file-independent encode and decode macros to a new H5encode.h header that is itself included in H5private.h. Removes UINT64ENCODE_VARLEN and UINT64DECODE_VARLEN, which were unused. Fixes include statements in files where H5VMprivate.h and H5MMprivate.h were included via H5Fprivate.h.
Diffstat (limited to 'src/H5HFbtree2.c')
-rw-r--r--src/H5HFbtree2.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index a00eb65..0c9d4a1 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -13,8 +13,6 @@
/*-------------------------------------------------------------------------
*
* Created: H5HFbtree2.c
- * Aug 7 2006
- * Quincey Koziol
*
* Purpose: v2 B-tree callbacks for "huge" object tracker
*
@@ -30,10 +28,13 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5B2private.h" /* B-Trees (Version 2) */
+#include "H5Eprivate.h" /* Error Handling */
+#include "H5Fprivate.h" /* Files */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5HFpkg.h" /* Fractal Heaps */
+#include "H5MFprivate.h" /* File Memory Management */
/****************/
/* Local Macros */
@@ -374,8 +375,8 @@ H5HF__huge_bt2_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
- H5F_ENCODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
- H5F_ENCODE_LENGTH_LEN(raw, nrecord->id, ctx->sizeof_size);
+ H5_ENCODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
+ H5_ENCODE_LENGTH_LEN(raw, nrecord->id, ctx->sizeof_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_indir_encode() */
@@ -406,8 +407,8 @@ H5HF__huge_bt2_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
- H5F_DECODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
- H5F_DECODE_LENGTH_LEN(raw, nrecord->id, ctx->sizeof_size);
+ H5_DECODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
+ H5_DECODE_LENGTH_LEN(raw, nrecord->id, ctx->sizeof_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_indir_decode() */
@@ -572,10 +573,10 @@ H5HF__huge_bt2_filt_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
- H5F_ENCODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
+ H5_ENCODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
UINT32ENCODE(raw, nrecord->filter_mask);
- H5F_ENCODE_LENGTH_LEN(raw, nrecord->obj_size, ctx->sizeof_size);
- H5F_ENCODE_LENGTH_LEN(raw, nrecord->id, ctx->sizeof_size);
+ H5_ENCODE_LENGTH_LEN(raw, nrecord->obj_size, ctx->sizeof_size);
+ H5_ENCODE_LENGTH_LEN(raw, nrecord->id, ctx->sizeof_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_filt_indir_encode() */
@@ -606,10 +607,10 @@ H5HF__huge_bt2_filt_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
- H5F_DECODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
+ H5_DECODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
UINT32DECODE(raw, nrecord->filter_mask);
- H5F_DECODE_LENGTH_LEN(raw, nrecord->obj_size, ctx->sizeof_size);
- H5F_DECODE_LENGTH_LEN(raw, nrecord->id, ctx->sizeof_size);
+ H5_DECODE_LENGTH_LEN(raw, nrecord->obj_size, ctx->sizeof_size);
+ H5_DECODE_LENGTH_LEN(raw, nrecord->id, ctx->sizeof_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_filt_indir_decode() */
@@ -761,7 +762,7 @@ H5HF__huge_bt2_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
- H5F_ENCODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
+ H5_ENCODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_dir_encode() */
@@ -792,7 +793,7 @@ H5HF__huge_bt2_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
- H5F_DECODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
+ H5_DECODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_dir_decode() */
@@ -968,9 +969,9 @@ H5HF__huge_bt2_filt_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
- H5F_ENCODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
+ H5_ENCODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
UINT32ENCODE(raw, nrecord->filter_mask);
- H5F_ENCODE_LENGTH_LEN(raw, nrecord->obj_size, ctx->sizeof_size);
+ H5_ENCODE_LENGTH_LEN(raw, nrecord->obj_size, ctx->sizeof_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_filt_dir_encode() */
@@ -1001,9 +1002,9 @@ H5HF__huge_bt2_filt_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
- H5F_DECODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
+ H5_DECODE_LENGTH_LEN(raw, nrecord->len, ctx->sizeof_size);
UINT32DECODE(raw, nrecord->filter_mask);
- H5F_DECODE_LENGTH_LEN(raw, nrecord->obj_size, ctx->sizeof_size);
+ H5_DECODE_LENGTH_LEN(raw, nrecord->obj_size, ctx->sizeof_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_filt_dir_decode() */