From 5215e3205a07b85e4e4cf1f8a8ca6be2b9556459 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sun, 27 Aug 2017 11:59:33 +0200 Subject: channels: refactor --- src/nvim/globals.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/nvim/globals.h') diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 1ff0f7eb89..c639dbcf83 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -1074,11 +1074,12 @@ EXTERN char_u e_invexpr2[] INIT(= N_("E15: Invalid expression: %s")); EXTERN char_u e_invrange[] INIT(= N_("E16: Invalid range")); EXTERN char_u e_invcmd[] INIT(= N_("E476: Invalid command")); EXTERN char_u e_isadir2[] INIT(= N_("E17: \"%s\" is a directory")); -EXTERN char_u e_invjob[] INIT(= N_("E900: Invalid job id")); +EXTERN char_u e_invchan[] INIT(= N_("E900: Invalid channel id")); +EXTERN char_u e_invchanjob[] INIT(= N_("E900: Invalid channel id: not a job")); EXTERN char_u e_jobtblfull[] INIT(= N_("E901: Job table is full")); EXTERN char_u e_jobspawn[] INIT(= N_( - "E903: Process failed to start: %s: \"%s\"")); -EXTERN char_u e_jobnotpty[] INIT(= N_("E904: Job is not connected to a pty")); + "E903: Process failed to start: %s: \"%s\"")); +EXTERN char_u e_channotpty[] INIT(= N_("E904: channel is not a pty")); EXTERN char_u e_libcall[] INIT(= N_("E364: Library call failed for \"%s()\"")); EXTERN char_u e_mkdir[] INIT(= N_("E739: Cannot create directory %s: %s")); EXTERN char_u e_markinval[] INIT(= N_("E19: Mark has invalid line number")); -- cgit From 1ebc96fe10fbdbec22caa26d5d52a9f095da9687 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Mon, 5 Jun 2017 08:29:10 +0200 Subject: channels: allow bytes sockets and stdio, and buffered bytes output --- src/nvim/globals.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/nvim/globals.h') diff --git a/src/nvim/globals.h b/src/nvim/globals.h index c639dbcf83..d21cfe7ab6 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -1080,6 +1080,8 @@ EXTERN char_u e_jobtblfull[] INIT(= N_("E901: Job table is full")); EXTERN char_u e_jobspawn[] INIT(= N_( "E903: Process failed to start: %s: \"%s\"")); EXTERN char_u e_channotpty[] INIT(= N_("E904: channel is not a pty")); +EXTERN char_u e_stdiochan2[] INIT(= N_( + "E905: Couldn't open stdio channel: %s")); EXTERN char_u e_libcall[] INIT(= N_("E364: Library call failed for \"%s()\"")); EXTERN char_u e_mkdir[] INIT(= N_("E739: Cannot create directory %s: %s")); EXTERN char_u e_markinval[] INIT(= N_("E19: Mark has invalid line number")); @@ -1190,9 +1192,13 @@ EXTERN char *ignoredp; // If a msgpack-rpc channel should be started over stdin/stdout EXTERN bool embedded_mode INIT(= false); +// Dont try to start an user interface +// or read/write to stdio (unless embedding) +EXTERN bool headless_mode INIT(= false); /// next free id for a job or rpc channel -EXTERN uint64_t next_chan_id INIT(= 1); +/// 1 is reserved for stdio channel +EXTERN uint64_t next_chan_id INIT(= 2); /// Used to track the status of external functions. /// Currently only used for iconv(). -- cgit From 90e5cc5484ceeb410ae2a2706e09ed475cade4a5 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Thu, 8 Jun 2017 17:15:53 +0200 Subject: channels: generalize jobclose() --- src/nvim/globals.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/globals.h') diff --git a/src/nvim/globals.h b/src/nvim/globals.h index d21cfe7ab6..d1b0ad0ed3 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -1082,6 +1082,9 @@ EXTERN char_u e_jobspawn[] INIT(= N_( EXTERN char_u e_channotpty[] INIT(= N_("E904: channel is not a pty")); EXTERN char_u e_stdiochan2[] INIT(= N_( "E905: Couldn't open stdio channel: %s")); +EXTERN char_u e_invstream[] INIT(= N_("E906: invalid stream for channel")); +EXTERN char_u e_invstreamrpc[] INIT(= N_( + "E906: invalid stream for rpc channel, use 'rpc'")); EXTERN char_u e_libcall[] INIT(= N_("E364: Library call failed for \"%s()\"")); EXTERN char_u e_mkdir[] INIT(= N_("E739: Cannot create directory %s: %s")); EXTERN char_u e_markinval[] INIT(= N_("E19: Mark has invalid line number")); -- cgit From 5af47031773fc647de867444693d1598d0da458d Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Fri, 9 Jun 2017 08:40:24 +0200 Subject: channels: stderr channel --- src/nvim/globals.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/nvim/globals.h') diff --git a/src/nvim/globals.h b/src/nvim/globals.h index d1b0ad0ed3..dcb8b40973 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -1199,10 +1199,6 @@ EXTERN bool embedded_mode INIT(= false); // or read/write to stdio (unless embedding) EXTERN bool headless_mode INIT(= false); -/// next free id for a job or rpc channel -/// 1 is reserved for stdio channel -EXTERN uint64_t next_chan_id INIT(= 2); - /// Used to track the status of external functions. /// Currently only used for iconv(). typedef enum { -- cgit