| Age | Commit message (Collapse) | Author | Files | Lines |
|
this is taken from one of my other projects. there was no reason
for there to be 2x the code
tests checking for surrogate characters and non characters were
removed. I see no reason why the user shouldn't be allowed to
insert those characters in text (they exist in the standard).
Also, in the case of non-characters only the first two were being
checked and not the other 64.
|
|
As far as I could tell from the code this was supposed to be a
fixed size LRU cache of sets of selection regions. The structure
had a maximum size member but it was never set or used.
Furthermore there was some very complicated management of 2
parallel sets of regions. Instead of that mess just treat the
cache as a circular buffer.
Note that this is really not that useful at the moment. While the
selection regions are saved and restored the editor mode is not.
Therefore the selection is visible but not in any way usable. That
will be fixed in the next commit.
|
|
|
|
|
|
|
|
if vis actually wants to be a library exported symbols may need
mark up depending on the platform (eg. __declspec(dllexport)).
This needs to be hidden behind a macro because the way you export
is not the same on every platform.
I did this based on the assumption that vis.h was supposed to be
the only interface to the "vis" library. Since nobody actually
uses vis as a library I have no idea if this is actually correct.
Anyway marking up all prototypes like this allows for one to
convert all functions to static if a single translation unit is
used by inserting at the start:
#define VIS_INTERNAL static
#define VIS_EXPORT static
|
|
the return of these functions already give all the necessary
information. this is not c standard library code, we have no need
of such a nonsensical error reporting mechanism
NOTE: since errno needs to be thread local accessing it from
non-libc code ends up being a function call and serves as a
pointless optimization barrier.
|
|
The amount of code we need to detect if this is present and handle
the fallback is more than if we just provide it ourselves.
Also we are passing in a difference of pointers so the argument
type should be ptrdiff_t. This avoids a C brain damage of having
unsigned size type which can wrap around if the caller is careful.
|
|
This commit refactors the lua test runner (`test.sh`) to support
running a test inside `gdb` when the `-d` or `--debug` flag is
passed.
|
|
Updated README to clarify repository purpose and structure.
|
|
These functions were only used for testing the text system. One of
them was moved to text-test.c to continue to facilitate this.
Otherwise these functions are just cluttering up the code and
making it hard to modify.
|
|
NOTE: buffer-test.c now directly includes buffer.c so that it can
continue to test functions which are defined as static/internal to
buffer.c
|
|
There was only a single user of this function because
buffer_appendf is significantly more useful. Change that caller
and reduce the code.
|
|
|
|
|
|
same as buffer commit Array is completely visible
|
|
Buffer is fully exposed to the program, no need to rely on the
linker to optimize useless code.
|
|
lets not make the code harder to read for no reason
|
|
|
|
|
|
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
|
|
|
|
Going forward all tests should be submitted here directly.
|
|
|
|
Sourcehut recurses into submodules when cloning the repo for building
so unlike github it uses the version of `test` that is checked into
the repo. This is better behaviour but does mean that the submodule
needs to be updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To fix compilation you need to update (or remove) config.h.
|
|
|
|
Use something like dos2unix(1) and unix2dos(1), if you
need to edit such files.
|