summaryrefslogtreecommitdiff
path: root/src/proto
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-30 18:12:19 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-30 18:12:19 +0000
commit4c5678ff0c376661d4a8183a5a074a1203413b9d (patch)
tree2ddd73cae34d17f2eb4290fda1131bb63f4a0fab /src/proto
parenta87749e3eae3f918b6678f45cf975f0cf06d3e97 (diff)
downloadvim-git-4c5678ff0c376661d4a8183a5a074a1203413b9d.tar.gz
patch 9.0.0977: it is not easy to see what client-server commands are doingv9.0.0977
Problem: It is not easy to see what client-server commands are doing. Solution: Add channel log messages if ch_log() is available. Move the channel logging and make it available with the +eval feature.
Diffstat (limited to 'src/proto')
-rw-r--r--src/proto/channel.pro5
-rw-r--r--src/proto/logfile.pro7
2 files changed, 8 insertions, 4 deletions
diff --git a/src/proto/channel.pro b/src/proto/channel.pro
index 17ce77711..794e60b22 100644
--- a/src/proto/channel.pro
+++ b/src/proto/channel.pro
@@ -1,6 +1,4 @@
/* channel.c */
-void ch_logfile(char_u *fname, char_u *opt);
-int ch_log_active(void);
channel_T *add_channel(void);
int has_any_channel(void);
int channel_still_useful(channel_T *channel);
@@ -28,6 +26,7 @@ void channel_close(channel_T *channel, int invoke_close_cb);
void channel_clear(channel_T *channel);
void channel_free_all(void);
int channel_in_blocking_wait(void);
+channel_T *get_channel_arg(typval_T *tv, int check_open, int reading, ch_part_T part);
void channel_handle_events(int only_keep_open);
int channel_any_keep_open(void);
void channel_set_nonblock(channel_T *channel, ch_part_T part);
@@ -45,8 +44,6 @@ void f_ch_close_in(typval_T *argvars, typval_T *rettv);
void f_ch_getbufnr(typval_T *argvars, typval_T *rettv);
void f_ch_getjob(typval_T *argvars, typval_T *rettv);
void f_ch_info(typval_T *argvars, typval_T *rettv);
-void f_ch_log(typval_T *argvars, typval_T *rettv);
-void f_ch_logfile(typval_T *argvars, typval_T *rettv);
void f_ch_open(typval_T *argvars, typval_T *rettv);
void f_ch_read(typval_T *argvars, typval_T *rettv);
void f_ch_readblob(typval_T *argvars, typval_T *rettv);
diff --git a/src/proto/logfile.pro b/src/proto/logfile.pro
new file mode 100644
index 000000000..1c4334ea4
--- /dev/null
+++ b/src/proto/logfile.pro
@@ -0,0 +1,7 @@
+/* logfile.c */
+void ch_logfile(char_u *fname, char_u *opt);
+int ch_log_active(void);
+void ch_log_literal(char *lead, channel_T *ch, ch_part_T part, char_u *buf, int len);
+void f_ch_log(typval_T *argvars, typval_T *rettv);
+void f_ch_logfile(typval_T *argvars, typval_T *rettv);
+/* vim: set ft=c : */