aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/rbuffer.c
Commit message (Collapse)AuthorAge
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
|
* build: remove PVSdundargoc2023-11-12
| | | | | | | We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
* fix(rbuffer): handle edge case where write_ptr has wrapped aroundbfredl2023-01-14
| | | | | | | | | | when using the rbuffer as a linear buffer, exactly filling the buffer will case write_ptr to wrap around too early. For now detect this special case. Of course, the rbuffer should refactored to a proper ring buffer where write_pos >= read_pos always and there is no special case for full buffers. This will be a follow up change.
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* docs: fix typos (#19588)dundargoc2022-08-03
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: notomo <notomo.motono@gmail.com>
* refactor(api): use a unpacker based on libmpack instead of msgpack-cbfredl2022-06-02
| | | | | | | | | | Currently this is more or less a straight off reimplementation, but this allow further optimizations down the line, especially for avoiding memory allocations of rpc objects. Current score for "make functionaltest; make oldtest" on a -DEXITFREE build: is 117 055 352 xfree(ptr != NULL) calls (that's NUMBERWANG!).
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* refactor: format with uncrustify #15755dundargoc2021-09-24
|
* channels: allow bytes sockets and stdio, and buffered bytes outputBjörn Linse2017-11-24
|
* *: Add comment to all C filesZyX2017-04-19
|
* rbuffer: Use xcalloc to ensure memory is initializedJames McCoy2016-11-28
| | | | | | | | | Since the rbuffer contents are used by string functions (like sscan, strlen, etc.), it is not safe to use uninitialized memory. Using xcalloc ensures the string-based functions do not run past the end of the buffer. Closes #5676
* Merge #4646 from oni-link/fix.issue.4569.3Justin M. Keyes2016-06-26
|\ | | | | Fix for missing output (#4569, ...)
| * process.c: Prevent data loss for process output streamsoni-link2016-05-15
| | | | | | | | | | For a terminating process, it's output streams could be closed, before all data is read.
* | file: Add buffered reading and writingZyX2016-06-23
|/ | | | Still no busted tests. Not tested without HAVE_PREADV.
* rbuffer: Enhance rbuffer_reset to work with filled RBuffersThiago de Arruda2015-10-01
|
* rbuffer: Fix for problems with escape input sequences.oni-link2015-07-07
| | | | | | | | | | | If at least two escape sequences were read, the beginning of the second sequence would be off by one and the sequence would be misinterpreted. An escape sequence could be split in two parts and be misinterpreted, when saved in a ring buffer with wrap around. Fixes #2936
* rbuffer: Reimplement as a ring buffer and decouple from rstreamThiago de Arruda2015-07-01
Extract the RBuffer class from rstream.c and reimplement it as a ring buffer, a more efficient version that doesn't need to relocate memory. The old rbuffer_read/rbuffer_write interfaces are kept for simple reading/writing, and the RBUFFER_UNTIL_{FULL,EMPTY} macros are introduced to hide wrapping logic when more control is required(such as passing the buffer pointer to a library function that writes directly to the pointer) Also add a basic infrastructure for writing helper C files that are only compiled in the unit test library, and use this to write unit tests for RBuffer which contains some macros that can't be accessed directly by luajit. Helped-by: oni-link <knil.ino@gmail.com> Reviewed-by: oni-link <knil.ino@gmail.com> Reviewed-by: Scott Prager <splinterofchaos@gmail.com> Reviewed-by: Justin M. Keyes <justinkz@gmail.com> Reviewed-by: Michael Reed <m.reed@mykolab.com>