diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-05-25 14:31:12 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-05-27 09:34:05 -0400 |
commit | b2c400b3f2354b2765e1d6f3b5ce4b11f2ab75a3 (patch) | |
tree | 5647ea22f1e7fd35b56df9893ebfd5717481d857 | |
parent | 4219b69145f13e95eadb5a666cb02b482bdd395b (diff) | |
download | rneovim-b2c400b3f2354b2765e1d6f3b5ce4b11f2ab75a3.tar.gz rneovim-b2c400b3f2354b2765e1d6f3b5ce4b11f2ab75a3.tar.bz2 rneovim-b2c400b3f2354b2765e1d6f3b5ce4b11f2ab75a3.zip |
input: rename input_{start,stop}_stdin()
- "stdin" is misleading because it may read from stdout or stderr
- also remove some unused includes
-rw-r--r-- | src/nvim/main.c | 6 | ||||
-rw-r--r-- | src/nvim/os/event.c | 2 | ||||
-rw-r--r-- | src/nvim/os/input.c | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 4714de7c59..fc72039b5f 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -279,7 +279,7 @@ int main(int argc, char **argv) // read the "-" file (eg: cat file | nvim -) fd = params.err_isatty ? fileno(stderr) : fileno(stdout); } - input_start_stdin(fd); + input_start(fd); } // open terminals when opening files that start with term:// @@ -386,8 +386,8 @@ int main(int argc, char **argv) } if (!params.headless) { - // Stop reading from stdin, the UI layer will take over now - input_stop_stdin(); + // Stop reading from input stream, the UI layer will take over now. + input_stop(); ui_builtin_start(); } diff --git a/src/nvim/os/event.c b/src/nvim/os/event.c index 0560da1e2e..b0bd7ca55a 100644 --- a/src/nvim/os/event.c +++ b/src/nvim/os/event.c @@ -73,7 +73,7 @@ void event_teardown(void) // is required because the `process_events_from` above may call `event_push` // which will set the stop_flag to 1(uv_stop) uv_default_loop()->stop_flag = 0; - input_stop_stdin(); + input_stop(); channel_teardown(); job_teardown(); server_teardown(); diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index f89ca4af95..74a5d3bc2e 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -1,6 +1,5 @@ #include <assert.h> #include <string.h> -#include <stdint.h> #include <stdbool.h> #include <uv.h> @@ -8,7 +7,6 @@ #include "nvim/api/private/defs.h" #include "nvim/os/input.h" #include "nvim/os/event.h" -#include "nvim/os/os.h" #include "nvim/os/rstream_defs.h" #include "nvim/os/rstream.h" #include "nvim/ascii.h" @@ -54,7 +52,7 @@ int input_global_fd(void) return global_fd; } -void input_start_stdin(int fd) +void input_start(int fd) { if (read_stream) { return; @@ -67,7 +65,7 @@ void input_start_stdin(int fd) rstream_start(read_stream); } -void input_stop_stdin(void) +void input_stop(void) { if (!read_stream) { return; |