diff options
| author | Randy Palamar <randy@rnpnr.xyz> | 2025-12-21 15:54:51 -0700 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2025-12-22 09:17:08 -0700 |
| commit | 88c25def890ba911196a91a7fa0936c15f069a92 (patch) | |
| tree | a0f910634081848a06396b55c9d9d509a4d31c2a /text-internal.h | |
| parent | fbc898a9cd132078b0128b70091f4aadbec519e3 (diff) | |
| download | vis-88c25def890ba911196a91a7fa0936c15f069a92.tar.gz vis-88c25def890ba911196a91a7fa0936c15f069a92.tar.xz | |
text: remove text-internal.h
this is not really useful anymore
Diffstat (limited to 'text-internal.h')
| -rw-r--r-- | text-internal.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/text-internal.h b/text-internal.h deleted file mode 100644 index 13647d6..0000000 --- a/text-internal.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef TEXT_INTERNAL -#define TEXT_INTERNAL - -#include "text.h" - -/* Block holding the file content, either readonly mmap(2)-ed from the original - * file or heap allocated to store the modifications. - */ -typedef struct { - size_t size; /* maximal capacity */ - size_t len; /* current used length / insertion position */ - char *data; /* actual data */ - enum { /* type of allocation */ - BLOCK_TYPE_MMAP_ORIG, /* mmap(2)-ed from an external file */ - BLOCK_TYPE_MMAP, /* mmap(2)-ed from a temporary file only known to this process */ - BLOCK_TYPE_MALLOC, /* heap allocated block using malloc(3) */ - } type; -} Block; - -VIS_INTERNAL Block *block_alloc(size_t size); -VIS_INTERNAL Block *block_read(size_t size, int fd); -VIS_INTERNAL Block *block_mmap(size_t size, int fd, off_t offset); -VIS_INTERNAL Block *block_load(int dirfd, const char *filename, enum TextLoadMethod method, struct stat *info); -VIS_INTERNAL void block_free(Block*); -VIS_INTERNAL bool block_capacity(Block*, size_t len); -VIS_INTERNAL const char *block_append(Block*, const char *data, size_t len); -VIS_INTERNAL bool block_insert(Block*, size_t pos, const char *data, size_t len); -VIS_INTERNAL bool block_delete(Block*, size_t pos, size_t len); - -VIS_INTERNAL Block *text_block_mmaped(Text*); -VIS_INTERNAL void text_saved(Text*, struct stat *meta); - -#endif |
