aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memfile.h
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-29 20:32:40 +0800
committerGitHub <noreply@github.com>2023-11-29 20:32:40 +0800
commita6cba103cebce535279db197f9efeb34e9d1171f (patch)
tree17a8d9b4ecabf8e2c02c07e18b81c85f2e7c429f /src/nvim/memfile.h
parentf4001d27efae44c6c07678ad2c72eed5f1a25ea8 (diff)
downloadrneovim-a6cba103cebce535279db197f9efeb34e9d1171f.tar.gz
rneovim-a6cba103cebce535279db197f9efeb34e9d1171f.tar.bz2
rneovim-a6cba103cebce535279db197f9efeb34e9d1171f.zip
refactor: move some constants out of vim_defs.h (#26298)
Diffstat (limited to 'src/nvim/memfile.h')
-rw-r--r--src/nvim/memfile.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/memfile.h b/src/nvim/memfile.h
index 2d1930e95c..687ac042a4 100644
--- a/src/nvim/memfile.h
+++ b/src/nvim/memfile.h
@@ -11,6 +11,15 @@ enum {
MFS_ZERO = 8, ///< only write block 0
};
+enum {
+ /// Minimal size for block 0 of a swap file.
+ /// NOTE: This depends on size of struct block0! It's not done with a sizeof(),
+ /// because struct block0 is defined in memline.c (Sorry).
+ /// The maximal block size is arbitrary.
+ MIN_SWAP_PAGE_SIZE = 1048,
+ MAX_SWAP_PAGE_SIZE = 50000,
+};
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "memfile.h.generated.h"
#endif