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.c
src/nvim/api/buffer.h src/nvim/api/buffer.h
src/nvim/api/defs.h src/nvim/api/private/defs.h
src/nvim/api/helpers.c src/nvim/api/private/helpers.c
src/nvim/api/helpers.h 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.c
src/nvim/api/tabpage.h src/nvim/api/tabpage.h
src/nvim/api/vim.c src/nvim/api/vim.c
@ -40,3 +42,7 @@ src/nvim/os/signal.c
src/nvim/os/signal.h src/nvim/os/signal.h
src/nvim/os/time.c src/nvim/os/time.c
src/nvim/os/time.h 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 #ifndef NVIM_API_PRIVATE_DEFS_H
#define NVIM_API_DEFS_H #define NVIM_API_PRIVATE_DEFS_H
#include <stdint.h> #include <stdint.h>
#include <stdbool.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 #ifndef NVIM_API_PRIVATE_HANDLE_H
#define NVIM_API_HANDLE_H #define NVIM_API_PRIVATE_HANDLE_H
#include "nvim/vim.h" #include "nvim/vim.h"
#include "nvim/buffer_defs.h" #include "nvim/buffer_defs.h"
@ -16,5 +16,5 @@ HANDLE_DECLS(tabpage_T, tabpage)
void handle_init(void); 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 #ifndef NVIM_API_PRIVATE_HELPERS_H
#define NVIM_API_HELPERS_H #define NVIM_API_PRIVATE_HELPERS_H
#include <stdbool.h> #include <stdbool.h>
@ -94,5 +94,5 @@ tabpage_T * find_tab(Tabpage tabpage, Error *err);
/// empty String is returned /// empty String is returned
String cstr_to_string(const char *str); String cstr_to_string(const char *str);
#endif // NVIM_API_HELPERS_H #endif // NVIM_API_PRIVATE_HELPERS_H

View File

@ -177,9 +177,9 @@ static void parse_msgpack(RStream *rstream, void *data, bool eof)
msgpack_unpacked unpacked; msgpack_unpacked unpacked;
msgpack_unpacked_init(&unpacked); msgpack_unpacked_init(&unpacked);
// Deserialize everything we can. // Deserialize everything we can.
while (msgpack_unpacker_next(channel->proto.msgpack.unpacker, &unpacked)) { while (msgpack_unpacker_next(channel->proto.msgpack.unpacker, &unpacked)) {
// Each object is a new msgpack-rpc request and requires an empty response // Each object is a new msgpack-rpc request and requires an empty response
msgpack_packer response; msgpack_packer response;
msgpack_packer_init(&response, msgpack_packer_init(&response,
channel->proto.msgpack.sbuffer, channel->proto.msgpack.sbuffer,

View File

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

View File

@ -10,7 +10,7 @@ void server_init();
void server_teardown(); void server_teardown();
/// Starts listening on arbitrary tcp/unix addresses specified by /// Starts listening on arbitrary tcp/unix addresses specified by
/// `endpoint` for API calls. The type of socket used(tcp or unix/pipe) will /// `endpoint` for API calls. The type of socket used(tcp or unix/pipe) will
/// be determined by parsing `endpoint`: If it's a valid tcp address in the /// be determined by parsing `endpoint`: If it's a valid tcp address in the
/// 'ip:port' format, then it will be tcp socket, else it will be a unix /// 'ip:port' format, then it will be tcp socket, else it will be a unix
/// socket or named pipe. /// socket or named pipe.