Build: Add more files to clint-files.txt and fix errors

This commit is contained in:
Thiago de Arruda 2014-05-26 13:39:16 -03:00
parent 3f990f1afb
commit d6291894d4
7 changed files with 23 additions and 17 deletions

View File

@ -1,8 +1,10 @@
src/nvim/api/buffer.c
src/nvim/api/buffer.h
src/nvim/api/defs.h
src/nvim/api/helpers.c
src/nvim/api/helpers.h
src/nvim/api/private/defs.h
src/nvim/api/private/helpers.c
src/nvim/api/private/helpers.h
src/nvim/api/private/handle.c
src/nvim/api/private/handle.h
src/nvim/api/tabpage.c
src/nvim/api/tabpage.h
src/nvim/api/vim.c
@ -40,3 +42,7 @@ src/nvim/os/signal.c
src/nvim/os/signal.h
src/nvim/os/time.c
src/nvim/os/time.h
src/nvim/os/server.c
src/nvim/os/server.h
src/nvim/os/channel.c
src/nvim/os/channel.h

View File

@ -1,5 +1,5 @@
#ifndef NVIM_API_DEFS_H
#define NVIM_API_DEFS_H
#ifndef NVIM_API_PRIVATE_DEFS_H
#define NVIM_API_PRIVATE_DEFS_H
#include <stdint.h>
#include <stdbool.h>
@ -85,5 +85,5 @@ struct key_value_pair {
};
#endif // NVIM_API_DEFS_H
#endif // NVIM_API_PRIVATE_DEFS_H

View File

@ -1,5 +1,5 @@
#ifndef NVIM_API_HANDLE_H
#define NVIM_API_HANDLE_H
#ifndef NVIM_API_PRIVATE_HANDLE_H
#define NVIM_API_PRIVATE_HANDLE_H
#include "nvim/vim.h"
#include "nvim/buffer_defs.h"
@ -16,5 +16,5 @@ HANDLE_DECLS(tabpage_T, tabpage)
void handle_init(void);
#endif // NVIM_API_HANDLE_H
#endif // NVIM_API_PRIVATE_HANDLE_H

View File

@ -1,5 +1,5 @@
#ifndef NVIM_API_HELPERS_H
#define NVIM_API_HELPERS_H
#ifndef NVIM_API_PRIVATE_HELPERS_H
#define NVIM_API_PRIVATE_HELPERS_H
#include <stdbool.h>
@ -94,5 +94,5 @@ tabpage_T * find_tab(Tabpage tabpage, Error *err);
/// empty String is returned
String cstr_to_string(const char *str);
#endif // NVIM_API_HELPERS_H
#endif // NVIM_API_PRIVATE_HELPERS_H

View File

@ -123,8 +123,8 @@ void server_start(char *endpoint, ChannelProtocol prot)
char *port_end;
// Extract the port
port = strtol(ip_end + 1, &port_end, 10);
errno = 0;
if (errno != 0 || port == 0 || port > 0xffff) {
// Invalid port, treat as named pipe or unix socket
server_type = kServerTypePipe;
@ -156,7 +156,7 @@ void server_start(char *endpoint, ChannelProtocol prot)
}
} else {
// Listen on named pipe or unix socket
strcpy(server->socket.pipe.addr, addr);
xstrlcpy(server->socket.pipe.addr, addr, sizeof(server->socket.pipe.addr));
uv_pipe_init(uv_default_loop(), &server->socket.pipe.handle, 0);
server->socket.pipe.handle.data = server;
uv_pipe_bind(&server->socket.pipe.handle, server->socket.pipe.addr);