vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit cf7aba3a92e2423c8051e1c34875644509d7382f
parent 32fe7465729f0b87f33fec6ee746a09b6804e1d5
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu, 22 Dec 2016 09:26:18 +0100

text: make default block size overridable via C pre-processor

This will be used for unit test purposes to force more allocations.

Diffstat:
Mtext.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/text.c b/text.c @@ -24,7 +24,9 @@ #include "util.h" /* Allocate blocks holding the actual file content in junks of size: */ +#ifndef BLOCK_SIZE #define BLOCK_SIZE (1 << 20) +#endif /* Files smaller than this value are copied on load, larger ones are mmap(2)-ed * directely. Hence the former can be truncated, while doing so on the latter * results in havoc. */