summaryrefslogtreecommitdiff
path: root/examples/dte/block.h
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
commitdcacc00e3750300617ba6e16eb346713f91a783a (patch)
tree38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/dte/block.h
parent58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff)
downloadcrep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz
Remove testing data
Diffstat (limited to 'examples/dte/block.h')
-rw-r--r--examples/dte/block.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/examples/dte/block.h b/examples/dte/block.h
deleted file mode 100644
index 6fbf361..0000000
--- a/examples/dte/block.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef BLOCK_H
-#define BLOCK_H
-
-#include <stddef.h>
-#include "util/list.h"
-#include "util/macros.h"
-
-enum {
- BLOCK_ALLOC_MULTIPLE = 64
-};
-
-// Blocks always contain whole lines.
-// There's one zero-sized block for an empty file.
-// Otherwise zero-sized blocks are forbidden.
-typedef struct {
- ListHead node;
- unsigned char NONSTRING *data;
- size_t size;
- size_t alloc;
- size_t nl;
-} Block;
-
-#define block_for_each(block_, list_head_) \
- for ( \
- block_ = BLOCK((list_head_)->next); \
- &block_->node != (list_head_); \
- block_ = BLOCK(block_->node.next) \
- )
-
-static inline Block *BLOCK(ListHead *item)
-{
- static_assert(offsetof(Block, node) == 0);
- return (Block*)item;
-}
-
-Block *block_new(size_t alloc) RETURNS_NONNULL;
-void block_free(Block *blk) NONNULL_ARGS;
-
-#endif