| Age | Commit message (Collapse) | Author | Files | Lines | |
|---|---|---|---|---|---|
| 2025-11-24 | text: remove a bunch of unused save functions | Randy Palamar | 1 | -18/+2 | |
| 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. | |||||
| 2025-11-24 | text-io: make TextSave visible | Randy Palamar | 1 | -2/+13 | |
| Having a failure case on allocing a TextSave is stupid. Ideally there would be no allocations in the file saving path but we have to replace the braindead dirname(3) with an internal implementation. | |||||
| 2025-06-13 | doc: fix Doxygen comments for text.h | Matěj Cepl | 1 | -24/+31 | |
| 2024-09-13 | support piping a buffer to an external process | Florian Fischer | 1 | -0/+6 | |
| Currently only Text objects can be piped to external commands. This is tedious if data not available in any file should be passed to an external process (e.g. building options and passing them to vis-menu). This adds the option to pass a buffer to _vis_pipe and provides wrapper functions for the original behavior and the new one. | |||||
| 2022-11-29 | fix miscellaneous spelling mistakes | Nick Hanley | 1 | -1/+1 | |
| 2020-12-10 | fix typos in comments | Moesasji | 1 | -7/+7 | |
| 2020-10-10 | text: provide public text_iterator_init | Marc André Tanner | 1 | -0/+1 | |
| It can be used to initialize a (stack allocated) Iterator structure, avoiding the copying of the return value as done by text_iterator_get which depending on the implementation might be problematic. | |||||
| 2020-10-10 | text: mark return value of text_iterator_text as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: make text_snapshot return whether it succeeded | Marc André Tanner | 1 | -1/+1 | |
| Currently this can't fail, but one can imagine implementations which do. | |||||
| 2020-10-10 | text: mark text_delete_range range argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_save_write_range range argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_mmaped argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_write{,_range} argument as const | Marc André Tanner | 1 | -2/+2 | |
| 2020-10-10 | text: mark text_size argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_mark_get argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_iterator_byte_get argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_bytes_alloc0 argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_byte(s)_get argument as const | Marc André Tanner | 1 | -2/+2 | |
| 2020-10-10 | text: mark text_iterator_get argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_state argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_modified argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: mark text_stat argument as const | Marc André Tanner | 1 | -1/+1 | |
| 2020-10-10 | text: introduce text_iterator_text | Marc André Tanner | 1 | -0/+1 | |
| 2020-10-10 | text: introduce text_iterator_has_{next,prev} | Marc André Tanner | 1 | -0/+2 | |
| Abstract away access to `it->piece` inorder to enable different implementations/backends. | |||||
| 2020-08-29 | text: provide save function taking a directory descriptor | Marc André Tanner | 1 | -1/+3 | |
| The standard does not specify mkstempat(3). We currently implement it in a non thread safe manner, by temporarily changing the process working directory before invoking mkstemp(3). | |||||
| 2020-08-29 | text: provide load function taking a directory descriptor | Marc André Tanner | 1 | -0/+2 | |
| 2020-08-29 | text: move misplaced text_save documentation snippet | Marc André Tanner | 1 | -4/+4 | |
| 2020-08-01 | doc: fix a couple of API doc warnings | Marc André Tanner | 1 | -16/+16 | |
| In restructured text double backquotes are used for inline literals. | |||||
| 2020-05-13 | text: introduce text_save_method, remove text_save_range | Marc André Tanner | 1 | -8/+13 | |
| This utility function is analogous to text_load_method and allows the caller to specify how the file should be saved. It is implemented as a wrapper around the lower level text_save_{begin,write,commit} primitives. The unused text_save_range function has been removed. If needed, use the aforementioned lower level functionality. | |||||
| 2018-05-30 | text: allow to specify how the file content should be loaded | Marc André Tanner | 1 | -1/+39 | |
| 2018-05-16 | text: use mkstemp(3) for temporary file creation in atomic saves | Marc André Tanner | 1 | -3/+4 | |
| Instead of simply appending a tilde to the original file name, we now create an unique temporary file based on the pattern `.filename.vis.XXXXXX`. In case the file does not yet exist, we use 0666 & ~umask as permission, (this should match the previous `open(2)` based behavior). | |||||
| 2017-07-11 | vis: cleanup register related API | Marc André Tanner | 1 | -0/+6 | |
| Also expose all register slots through the Lua API. | |||||
| 2017-05-03 | text: remove text_history_get function | Marc André Tanner | 1 | -3/+0 | |
| As currently implemented this does not properly integrate with multiple cursor support. The functionality should be provided in a layer higher up. The jumplist and changelist need to be redesigned, for now they are broken. | |||||
| 2017-05-03 | text: remove text_iterate macro | Marc André Tanner | 1 | -5/+0 | |
| 2017-05-03 | text: remove text_insert_newline function | Marc André Tanner | 1 | -2/+0 | |
| This is no longer needed because we always insert \n never \r\n. | |||||
| 2017-05-03 | text: remove count argument from text_{earlier,later} | Marc André Tanner | 1 | -2/+2 | |
| 2017-05-03 | text: add miscellaneous documentation section | Marc André Tanner | 1 | -8/+11 | |
| 2017-05-03 | text: rename text_sigbus to text_mmaped | Marc André Tanner | 1 | -3/+5 | |
| Add casts to uintptr_t to avoid unrelated pointer comparisons. | |||||
| 2017-05-03 | text: convert comments to doxygen format | Marc André Tanner | 1 | -84/+293 | |
| 2017-04-09 | vis: remove handling of \r\n line endings | Marc André Tanner | 1 | -9/+0 | |
| Use something like dos2unix(1) and unix2dos(1), if you need to edit such files. | |||||
| 2017-04-09 | text: drop special handling of \r\n line endings | Marc André Tanner | 1 | -6/+0 | |
| 2017-04-09 | text: add mem{r,}chr(3) based byte search functions | Marc André Tanner | 1 | -0/+2 | |
| These are generally implemented efficiently in libc. While memrchr(3) is non-standard, it is a common extension. If it is not available, we use a simple C implementation from musl. | |||||
| 2017-04-08 | text: introduce text_char_get which converts \r\n to \n | Marc André Tanner | 1 | -0/+3 | |
| 2017-02-25 | text: add iterator accessor function which translates \r\n to \n | Marc André Tanner | 1 | -0/+3 | |
| 2016-12-23 | Apply format string attribute to printf style functions | Marc André Tanner | 1 | -2/+2 | |
| Not strictly C99 conform, but widely supported and easy enough to NOP for compilers which do not support it. Besides it was already used to mark certain functions as noreturn. | |||||
| 2016-12-23 | text: make text_vprintf static, it is only used within text.c | Marc André Tanner | 1 | -1/+0 | |
| 2016-12-22 | text: remove Filepos typedef | Marc André Tanner | 1 | -2/+0 | |
| The idea might be good, but it was almost unused. | |||||
| 2016-12-22 | text: introduce EMARK to denote an invalid mark | Marc André Tanner | 1 | -1/+3 | |
| Technically this macro name is in the reserved namespace of errno.h. The same is true for EPOS. Maybe we should rename them at some point, but for now the short names are convenient. Fix #443 Close #444 | |||||
| 2016-12-22 | text: change datatype of Mark to uintptr_t | Marc André Tanner | 1 | -1/+2 | |
| This should avoid undefined pointer comparisons. | |||||
| 2016-12-14 | text: expose text save method to calling code | Marc André Tanner | 1 | -1/+7 | |
| There are cases where it is useful to specify how the file should be saved. | |||||
