aboutsummaryrefslogtreecommitdiff
path: root/src/os/rstream.c
Commit message (Collapse)AuthorAge
* Introduce nvim namespace: Move files.Eliseo Martínez2014-05-15
| | | | | | Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.
* Fix jumps depending on unitialized valuesThiago de Arruda2014-05-12
| | | | Reported by valgrind
* Refactor modules to use handle data accessorsThiago de Arruda2014-05-12
| | | | The job, rstream and wstream modules now use handle data accessors
* Broken build on 32 bit: Pending TODO: Reenable assertion.Eliseo Martínez2014-04-24
| | | | | | On a1a0c00589a8efc664db82be6743136bb462e08f, an assertion was disabled because of breaking 32bit build. This fixes that so that it now always works.
* Fix clint.sh wrapper script and broken filesThiago de Arruda2014-04-22
| | | | | - Fixed clint.sh, it no longer ignores errors in individual files. - Fixed two files that weren't passing the clint test
* Broken build on 32 bit: Fix -Wtautological-constant-out-of-range-compare.Eliseo Martínez2014-04-22
| | | | | | | | | | | | | | | | | | | Problem: [ 51%] Building C object src/CMakeFiles/nvim.dir/os/rstream.c.o /Users/eliseo/projects/os/neovim/src/os/rstream.c:237:24: error: comparison of constant 9223372036854775807 with expression of type 'size_t' (aka 'unsigned long') is always true [-Werror,-Wtautological-constant-out-of-range-compare] assert(rstream->fpos <= INT64_MAX); ~~~~~~~~~~~~~ ^ ~~~~~~~~~ /usr/include/assert.h:93:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) ^ Solution: Assertion temporarily disabled. TODO: Review types so that assertion can be used.
* fix -Wconversion warnings for rstreamNicolas Hillegeer2014-04-21
| | | | | | | I'm not sure whether to go for signed or unsigned types for the offsets, but without a doubt size_t is a better alternative than uint32_t. Added casts after checking bounds before and after calling external libraries (in this case libuv).
* Correctly free libuv handlesThiago de Arruda2014-04-18
| | | | | This ensures memory chunks for libuv handles are only freed after the event loop no longer has references to it.
* Create EventType for RStream readingThiago de Arruda2014-04-18
| | | | | | | RStream will be the main way Neovim receives asynchronous messages, so it is best to have a specialized EventType for it. A new flag parameter was added to `rstream_new` which tells the RStream instance to defer event handling for later with KE_EVENT instead of handling it directly from libuv callback.
* Deal with backpressure on RStream instancesThiago de Arruda2014-04-18
| | | | | Each RStream instance will now stop its libuv watcher when the buffer is full, and automatically restart when some data is read with `rstream_read`.
* Extract reading boilerplate into rstream.c moduleThiago de Arruda2014-04-16
The `RStream` class hides the differences between files and other types of streams with a simpler, general-purpose API for performing non-blocking reads with libuv. Most of the code was adapted from input.c.