aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/msgpack_rpc/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/msgpack_rpc/server.c')
-rw-r--r--src/nvim/msgpack_rpc/server.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/nvim/msgpack_rpc/server.c b/src/nvim/msgpack_rpc/server.c
index 532e684f93..b1e033d9f1 100644
--- a/src/nvim/msgpack_rpc/server.c
+++ b/src/nvim/msgpack_rpc/server.c
@@ -1,25 +1,22 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
-#include <assert.h>
#include <inttypes.h>
-#include <stdlib.h>
+#include <stdbool.h>
+#include <stdio.h>
#include <string.h>
+#include <uv.h>
-#include "nvim/ascii.h"
+#include "nvim/channel.h"
#include "nvim/eval.h"
#include "nvim/event/socket.h"
-#include "nvim/fileio.h"
#include "nvim/garray.h"
#include "nvim/log.h"
#include "nvim/main.h"
#include "nvim/memory.h"
-#include "nvim/msgpack_rpc/channel.h"
#include "nvim/msgpack_rpc/server.h"
#include "nvim/os/os.h"
-#include "nvim/path.h"
-#include "nvim/strings.h"
-#include "nvim/vim.h"
+#include "nvim/os/stdpaths_defs.h"
#define MAX_CONNECTIONS 32
#define ENV_LISTEN "NVIM_LISTEN_ADDRESS" // deprecated
@@ -94,7 +91,7 @@ char *server_address_new(const char *name)
{
static uint32_t count = 0;
char fmt[ADDRESS_MAX_SIZE];
-#ifdef WIN32
+#ifdef MSWIN
int r = snprintf(fmt, sizeof(fmt), "\\\\.\\pipe\\%s.%" PRIu64 ".%" PRIu32,
name ? name : "nvim", os_get_pid(), count++);
#else
@@ -173,7 +170,7 @@ int server_start(const char *addr)
((SocketWatcher **)watchers.ga_data)[watchers.ga_len++] = watcher;
// Update v:servername, if not set.
- if (STRLEN(get_vim_var_str(VV_SEND_SERVER)) == 0) {
+ if (strlen(get_vim_var_str(VV_SEND_SERVER)) == 0) {
set_vservername(&watchers);
}