| Age | Commit message (Collapse) | Author | Files | Lines | |
|---|---|---|---|---|---|
| 2025-01-12 | array: delete oneliners | Randy Palamar | 1 | -7/+7 | |
| same as buffer commit Array is completely visible | |||||
| 2022-11-29 | fix miscellaneous spelling mistakes | Nick Hanley | 1 | -5/+5 | |
| 2020-12-10 | fix typos in comments | Moesasji | 1 | -17/+17 | |
| 2020-10-30 | text: simplify iterator_init | Marc André Tanner | 1 | -2/+1 | |
| This was added in c240368d5da8208c15e0263034384414d938afb3 to work around a possibly bogus tis-interpreter warning regarding multiple accesses in the same expression. | |||||
| 2020-10-30 | text: avoid invalid pointer arithmetic | Marc André Tanner | 1 | -2/+2 | |
| 2020-10-10 | text: move higher level utility functions to separate file | Marc André Tanner | 1 | -68/+0 | |
| The moved functions do not need access to internals of text.c, but instead use the public interfaces. Splitting them out should facilitate experimentation with different core text management data structures. | |||||
| 2020-10-10 | text: move generic iterator functionality to separate file | Marc André Tanner | 1 | -170/+0 | |
| 2020-10-10 | text: move I/O related code to separate file | Marc André Tanner | 1 | -562/+3 | |
| This groups all I/O related code together to make it reusable in different core text data structure implementations. | |||||
| 2020-10-10 | text: provide public text_iterator_init | Marc André Tanner | 1 | -2/+6 | |
| 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: rename internal text_iterator_init | Marc André Tanner | 1 | -4/+4 | |
| This is in preparation for a public function of the same name. | |||||
| 2020-10-10 | text: mark return value of text_iterator_text as const | Marc André Tanner | 1 | -4/+4 | |
| 2020-10-10 | text: make text_snapshot return whether it succeeded | Marc André Tanner | 1 | -1/+2 | |
| 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 | -3/+3 | |
| 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 | -3/+10 | |
| 2020-10-10 | text: introduce text_iterator_has_{next,prev} | Marc André Tanner | 1 | -4/+12 | |
| Abstract away access to `it->piece` inorder to enable different implementations/backends. | |||||
| 2020-10-10 | text: add namespace prefix to block type constants | Marc André Tanner | 1 | -10/+10 | |
| 2020-10-10 | text: avoid direct access to txt->blocks in I/O related code | Marc André Tanner | 1 | -3/+10 | |
| 2020-10-10 | text: introduce text_saved | Marc André Tanner | 1 | -10/+11 | |
| Utiltiy function to update book keeping data after a successful save, takes an optional struct stat of the new file. | |||||
| 2020-10-10 | text: use public text_stat interface where possible | Marc André Tanner | 1 | -3/+4 | |
| 2020-10-10 | text: introduce block_load | Marc André Tanner | 1 | -24/+36 | |
| 2020-10-10 | text: store blocks in array | Marc André Tanner | 1 | -31/+35 | |
| Make block manipulation routines independent of core text data structure, enabling re-usage in different implementations. | |||||
| 2020-10-10 | text: simplify reading of initial file content | Marc André Tanner | 1 | -6/+7 | |
| Avoid unnecessary copy and system calls in block_read. | |||||
| 2020-08-29 | text: provide save function taking a directory descriptor | Marc André Tanner | 1 | -10/+39 | |
| 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 | -1/+9 | |
| 2020-06-28 | text: simplify remapping of original file content | Marc André Tanner | 1 | -9/+1 | |
| Use mmap with MAP_FIXED which replaces existing mappings without any race conditions between the munmap/mmap calls. | |||||
| 2020-06-22 | text: remove dead store | Marc André Tanner | 1 | -1/+0 | |
| 2020-06-22 | text: code cleanup, use local variable | Marc André Tanner | 1 | -8/+9 | |
| No functionl change. | |||||
| 2020-06-22 | text: fix typo in comments, no code change | Marc André Tanner | 1 | -4/+4 | |
| 2020-05-13 | text: introduce text_save_method, remove text_save_range | Marc André Tanner | 1 | -9/+9 | |
| 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. | |||||
| 2020-01-26 | text: ignore fsync(2) errors on unsupported directory descriptors | Marc André Tanner | 1 | -1/+1 | |
| When saving a file by atomically renaming it to its final destination, we fsync(2) the parent directory to make sure the new directory entry is persisted. However, not all file systems support fsync on file descriptors referring to directories. As a result the save operation fails and subsequent attempts result in warnings regarding outdated file content, even though the data has most likely been successfully written. Ignoring this particular error seems fine, because it is a permanent limitation of the file system and not a temporary failure. Fixes #792 | |||||
| 2018-05-30 | text: only default to mmap for files larger than 64 MiB | Marc André Tanner | 1 | -1/+1 | |
| 2018-05-30 | text: allow to specify how the file content should be loaded | Marc André Tanner | 1 | -3/+5 | |
| 2018-05-16 | text: use mkstemp(3) for temporary file creation in atomic saves | Marc André Tanner | 1 | -6/+25 | |
| 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). | |||||
| 2018-05-16 | text: do not unlink existing `file~` when saving to `file` | Marc André Tanner | 1 | -1/+3 | |
| Fail atomic save if temporary file already exists. A follow up commit will use `mkstemp(3)` for temporary file creation. | |||||
| 2017-07-05 | text: limit write(2) calls to INT_MAX bytes | Marc André Tanner | 1 | -1/+1 | |
| Otherwise this fails on macOS. Fix #578 | |||||
| 2017-05-03 | text: remove text_history_get function | Marc André Tanner | 1 | -12/+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 | -3/+9 | |
| 2017-05-03 | text: remove text_insert_newline function | Marc André Tanner | 1 | -4/+0 | |
| This is no longer needed because we always insert \n never \r\n. | |||||
