Mercurial > vim
comparison src/proto/channel.pro @ 10259:a09db7a4afe0 v8.0.0027
commit https://github.com/vim/vim/commit/dc0ccaee68ca24d10050117fbec757ad33590a17
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 9 17:28:01 2016 +0200
patch 8.0.0027
Problem: A channel is closed when reading on stderr or stdout fails, but
there may still be something to read on another part.
Solution: Turn ch_to_be_closed into a bitfield. (Ozaki Kiichi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 09 Oct 2016 17:30:04 +0200 |
parents | 175b1116f96a |
children | 56cb9538386c |
comparison
equal
deleted
inserted
replaced
10258:a99c7e02b61a | 10259:a09db7a4afe0 |
---|---|
12 channel_T *channel_open(char *hostname, int port_in, int waittime, void (*nb_close_cb)(void)); | 12 channel_T *channel_open(char *hostname, int port_in, int waittime, void (*nb_close_cb)(void)); |
13 channel_T *channel_open_func(typval_T *argvars); | 13 channel_T *channel_open_func(typval_T *argvars); |
14 void channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err); | 14 void channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err); |
15 void channel_set_job(channel_T *channel, job_T *job, jobopt_T *options); | 15 void channel_set_job(channel_T *channel, job_T *job, jobopt_T *options); |
16 void channel_set_options(channel_T *channel, jobopt_T *opt); | 16 void channel_set_options(channel_T *channel, jobopt_T *opt); |
17 void channel_set_req_callback(channel_T *channel, int part, char_u *callback, partial_T *partial, int id); | 17 void channel_set_req_callback(channel_T *channel, ch_part_T part, char_u *callback, partial_T *partial, int id); |
18 void channel_buffer_free(buf_T *buf); | 18 void channel_buffer_free(buf_T *buf); |
19 void channel_write_any_lines(void); | 19 void channel_write_any_lines(void); |
20 void channel_write_new_lines(buf_T *buf); | 20 void channel_write_new_lines(buf_T *buf); |
21 readq_T *channel_peek(channel_T *channel, int part); | 21 readq_T *channel_peek(channel_T *channel, ch_part_T part); |
22 char_u *channel_first_nl(readq_T *node); | 22 char_u *channel_first_nl(readq_T *node); |
23 char_u *channel_get(channel_T *channel, int part); | 23 char_u *channel_get(channel_T *channel, ch_part_T part); |
24 void channel_consume(channel_T *channel, int part, int len); | 24 void channel_consume(channel_T *channel, ch_part_T part, int len); |
25 int channel_collapse(channel_T *channel, int part, int want_nl); | 25 int channel_collapse(channel_T *channel, ch_part_T part, int want_nl); |
26 int channel_can_write_to(channel_T *channel); | 26 int channel_can_write_to(channel_T *channel); |
27 int channel_is_open(channel_T *channel); | 27 int channel_is_open(channel_T *channel); |
28 char *channel_status(channel_T *channel, int req_part); | 28 char *channel_status(channel_T *channel, int req_part); |
29 void channel_info(channel_T *channel, dict_T *dict); | 29 void channel_info(channel_T *channel, dict_T *dict); |
30 void channel_close(channel_T *channel, int invoke_close_cb); | 30 void channel_close(channel_T *channel, int invoke_close_cb); |
31 void channel_close_in(channel_T *channel); | 31 void channel_close_in(channel_T *channel); |
32 void channel_clear(channel_T *channel); | 32 void channel_clear(channel_T *channel); |
33 void channel_free_all(void); | 33 void channel_free_all(void); |
34 char_u *channel_read_block(channel_T *channel, int part, int timeout); | 34 char_u *channel_read_block(channel_T *channel, ch_part_T part, int timeout); |
35 int channel_read_json_block(channel_T *channel, int part, int timeout_arg, int id, typval_T **rettv); | 35 int channel_read_json_block(channel_T *channel, ch_part_T part, int timeout_arg, int id, typval_T **rettv); |
36 void common_channel_read(typval_T *argvars, typval_T *rettv, int raw); | 36 void common_channel_read(typval_T *argvars, typval_T *rettv, int raw); |
37 channel_T *channel_fd2channel(sock_T fd, int *partp); | 37 channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp); |
38 void channel_handle_events(void); | 38 void channel_handle_events(void); |
39 int channel_send(channel_T *channel, int part, char_u *buf, int len, char *fun); | 39 int channel_send(channel_T *channel, ch_part_T part, char_u *buf, int len, char *fun); |
40 channel_T *send_common(typval_T *argvars, char_u *text, int id, int eval, jobopt_T *opt, char *fun, int *part_read); | |
41 void ch_expr_common(typval_T *argvars, typval_T *rettv, int eval); | 40 void ch_expr_common(typval_T *argvars, typval_T *rettv, int eval); |
42 void ch_raw_common(typval_T *argvars, typval_T *rettv, int eval); | 41 void ch_raw_common(typval_T *argvars, typval_T *rettv, int eval); |
43 int channel_poll_setup(int nfd_in, void *fds_in); | 42 int channel_poll_setup(int nfd_in, void *fds_in); |
44 int channel_poll_check(int ret_in, void *fds_in); | 43 int channel_poll_check(int ret_in, void *fds_in); |
45 int channel_select_setup(int maxfd_in, void *rfds_in, void *wfds_in); | 44 int channel_select_setup(int maxfd_in, void *rfds_in, void *wfds_in); |
46 int channel_select_check(int ret_in, void *rfds_in, void *wfds_in); | 45 int channel_select_check(int ret_in, void *rfds_in, void *wfds_in); |
47 int channel_parse_messages(void); | 46 int channel_parse_messages(void); |
48 int set_ref_in_channel(int copyID); | 47 int set_ref_in_channel(int copyID); |
49 int channel_part_send(channel_T *channel); | 48 ch_part_T channel_part_send(channel_T *channel); |
50 int channel_part_read(channel_T *channel); | 49 ch_part_T channel_part_read(channel_T *channel); |
51 ch_mode_T channel_get_mode(channel_T *channel, int part); | 50 ch_mode_T channel_get_mode(channel_T *channel, ch_part_T part); |
52 int channel_get_timeout(channel_T *channel, int part); | 51 int channel_get_timeout(channel_T *channel, ch_part_T part); |
53 void clear_job_options(jobopt_T *opt); | 52 void clear_job_options(jobopt_T *opt); |
54 void free_job_options(jobopt_T *opt); | 53 void free_job_options(jobopt_T *opt); |
55 int get_job_options(typval_T *tv, jobopt_T *opt, int supported); | 54 int get_job_options(typval_T *tv, jobopt_T *opt, int supported); |
56 channel_T *get_channel_arg(typval_T *tv, int check_open, int reading, int part); | 55 channel_T *get_channel_arg(typval_T *tv, int check_open, int reading, ch_part_T part); |
57 void job_free_all(void); | 56 void job_free_all(void); |
58 int set_ref_in_job(int copyID); | 57 int set_ref_in_job(int copyID); |
59 void job_unref(job_T *job); | 58 void job_unref(job_T *job); |
60 int free_unused_jobs_contents(int copyID, int mask); | 59 int free_unused_jobs_contents(int copyID, int mask); |
61 void free_unused_jobs(int copyID, int mask); | 60 void free_unused_jobs(int copyID, int mask); |