diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-23 15:49:25 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-23 16:06:58 -0300 |
commit | 72e3125f452ae7224162da8e940e20b00680d41a (patch) | |
tree | 0838c44afc2ebdb583585f6522248ed2efdff397 | |
parent | 399a0e37405a0f68ef3373c8ad9bcfa94ee0f649 (diff) | |
download | rneovim-72e3125f452ae7224162da8e940e20b00680d41a.tar.gz rneovim-72e3125f452ae7224162da8e940e20b00680d41a.tar.bz2 rneovim-72e3125f452ae7224162da8e940e20b00680d41a.zip |
API: Refactor: Move non-public files to private subdirectory
-rw-r--r-- | src/nvim/CMakeLists.txt | 17 | ||||
-rw-r--r-- | src/nvim/api/buffer.c | 4 | ||||
-rw-r--r-- | src/nvim/api/buffer.h | 2 | ||||
-rw-r--r-- | src/nvim/api/private/defs.h (renamed from src/nvim/api/defs.h) | 0 | ||||
-rw-r--r-- | src/nvim/api/private/helpers.c (renamed from src/nvim/api/helpers.c) | 4 | ||||
-rw-r--r-- | src/nvim/api/private/helpers.h (renamed from src/nvim/api/helpers.h) | 2 | ||||
-rw-r--r-- | src/nvim/api/tabpage.c | 4 | ||||
-rw-r--r-- | src/nvim/api/tabpage.h | 2 | ||||
-rw-r--r-- | src/nvim/api/vim.c | 4 | ||||
-rw-r--r-- | src/nvim/api/vim.h | 2 | ||||
-rw-r--r-- | src/nvim/api/window.c | 4 | ||||
-rw-r--r-- | src/nvim/api/window.h | 2 | ||||
-rw-r--r-- | src/nvim/os/msgpack_rpc.h | 2 |
13 files changed, 20 insertions, 29 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index d9ec65af86..ad45f3ad3b 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -6,17 +6,6 @@ file(GLOB API_HEADERS api/*.h) set(MSGPACK_RPC_HEADER ${PROJECT_SOURCE_DIR}/src/nvim/os/msgpack_rpc.h) set(MSGPACK_DISPATCH ${GENERATED_DIR}/msgpack_dispatch.c) -# Remove helpers.h from API_HEADERS since it doesn't contain public API -# functions -foreach(sfile ${API_HEADERS}) - get_filename_component(f ${sfile} NAME) - if(${f} MATCHES "^(helpers.h)$") - list(APPEND to_remove ${sfile}) - endif() -endforeach() -list(REMOVE_ITEM API_HEADERS ${to_remove}) -set(to_remove) - file(MAKE_DIRECTORY ${GENERATED_DIR}) add_custom_command(OUTPUT ${MSGPACK_DISPATCH} @@ -42,6 +31,7 @@ list(APPEND NEOVIM_SOURCES "${MSGPACK_DISPATCH}") file( GLOB OS_SOURCES os/*.c ) file( GLOB API_SOURCES api/*.c ) +file( GLOB API_PRIV_SOURCES api/private/*.c ) set(CONV_SRCS api.c @@ -110,13 +100,14 @@ list(APPEND NVIM_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) if(NOT DEFINED ENV{SKIP_EXEC}) - add_executable(nvim ${NEOVIM_SOURCES} ${OS_SOURCES} ${API_SOURCES}) + add_executable(nvim ${NEOVIM_SOURCES} ${OS_SOURCES} ${API_SOURCES} + ${API_PRIV_SOURCES}) target_link_libraries(nvim ${NVIM_LINK_LIBRARIES}) install(TARGETS nvim RUNTIME DESTINATION bin) endif() if(NOT DEFINED ENV{SKIP_UNITTEST}) add_library(nvim-test MODULE EXCLUDE_FROM_ALL ${NEOVIM_SOURCES} - ${OS_SOURCES} ${API_SOURCES}) + ${OS_SOURCES} ${API_SOURCES} ${API_PRIV_SOURCES}) target_link_libraries(nvim-test ${NVIM_LINK_LIBRARIES}) endif() diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index fd3c76cc39..9a4285d74c 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -4,8 +4,8 @@ #include <stdlib.h> #include "nvim/api/buffer.h" -#include "nvim/api/helpers.h" -#include "nvim/api/defs.h" +#include "nvim/api/private/helpers.h" +#include "nvim/api/private/defs.h" #include "nvim/vim.h" #include "nvim/buffer.h" #include "nvim/memline.h" diff --git a/src/nvim/api/buffer.h b/src/nvim/api/buffer.h index 5f39589679..2350f7f41d 100644 --- a/src/nvim/api/buffer.h +++ b/src/nvim/api/buffer.h @@ -4,7 +4,7 @@ #include <stdint.h> #include <stdbool.h> -#include "nvim/api/defs.h" +#include "nvim/api/private/defs.h" /// Gets the buffer line count /// diff --git a/src/nvim/api/defs.h b/src/nvim/api/private/defs.h index 3ee50310fb..3ee50310fb 100644 --- a/src/nvim/api/defs.h +++ b/src/nvim/api/private/defs.h diff --git a/src/nvim/api/helpers.c b/src/nvim/api/private/helpers.c index a193c8721e..a7d155382c 100644 --- a/src/nvim/api/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -2,8 +2,8 @@ #include <stdlib.h> #include <string.h> -#include "nvim/api/helpers.h" -#include "nvim/api/defs.h" +#include "nvim/api/private/helpers.h" +#include "nvim/api/private/defs.h" #include "nvim/vim.h" #include "nvim/buffer.h" #include "nvim/window.h" diff --git a/src/nvim/api/helpers.h b/src/nvim/api/private/helpers.h index f93487d62f..da7e357d04 100644 --- a/src/nvim/api/helpers.h +++ b/src/nvim/api/private/helpers.h @@ -3,7 +3,7 @@ #include <stdbool.h> -#include "nvim/api/defs.h" +#include "nvim/api/private/defs.h" #include "nvim/vim.h" #define set_api_error(message, err) \ diff --git a/src/nvim/api/tabpage.c b/src/nvim/api/tabpage.c index fc50723ba5..f4e5f2857a 100644 --- a/src/nvim/api/tabpage.c +++ b/src/nvim/api/tabpage.c @@ -4,8 +4,8 @@ #include "nvim/api/tabpage.h" #include "nvim/api/vim.h" -#include "nvim/api/defs.h" -#include "nvim/api/helpers.h" +#include "nvim/api/private/defs.h" +#include "nvim/api/private/helpers.h" Integer tabpage_get_window_count(Tabpage tabpage, Error *err) { diff --git a/src/nvim/api/tabpage.h b/src/nvim/api/tabpage.h index ef049fb644..abf4377ee4 100644 --- a/src/nvim/api/tabpage.h +++ b/src/nvim/api/tabpage.h @@ -4,7 +4,7 @@ #include <stdint.h> #include <stdbool.h> -#include "nvim/api/defs.h" +#include "nvim/api/private/defs.h" /// Gets the number of windows in a tabpage /// diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 8cf4fb04d7..cfde53b0a8 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -4,8 +4,8 @@ #include <string.h> #include "nvim/api/vim.h" -#include "nvim/api/helpers.h" -#include "nvim/api/defs.h" +#include "nvim/api/private/helpers.h" +#include "nvim/api/private/defs.h" #include "nvim/api/buffer.h" #include "nvim/vim.h" #include "nvim/buffer.h" diff --git a/src/nvim/api/vim.h b/src/nvim/api/vim.h index 4ecc9fc2d0..2a712c19a1 100644 --- a/src/nvim/api/vim.h +++ b/src/nvim/api/vim.h @@ -4,7 +4,7 @@ #include <stdint.h> #include <stdbool.h> -#include "nvim/api/defs.h" +#include "nvim/api/private/defs.h" /// Send keys to vim input buffer, simulating user input. /// diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c index 8e21034c40..73487d9c49 100644 --- a/src/nvim/api/window.c +++ b/src/nvim/api/window.c @@ -3,8 +3,8 @@ #include <stdlib.h> #include "nvim/api/window.h" -#include "nvim/api/defs.h" -#include "nvim/api/helpers.h" +#include "nvim/api/private/defs.h" +#include "nvim/api/private/helpers.h" #include "nvim/vim.h" #include "nvim/window.h" #include "nvim/screen.h" diff --git a/src/nvim/api/window.h b/src/nvim/api/window.h index 525b7f86c7..4c036ff5d7 100644 --- a/src/nvim/api/window.h +++ b/src/nvim/api/window.h @@ -4,7 +4,7 @@ #include <stdint.h> #include <stdbool.h> -#include "nvim/api/defs.h" +#include "nvim/api/private/defs.h" /// Gets the current buffer in a window /// diff --git a/src/nvim/os/msgpack_rpc.h b/src/nvim/os/msgpack_rpc.h index 0e9d474d8d..0f644273cd 100644 --- a/src/nvim/os/msgpack_rpc.h +++ b/src/nvim/os/msgpack_rpc.h @@ -6,7 +6,7 @@ #include <msgpack.h> -#include "nvim/api/defs.h" +#include "nvim/api/private/defs.h" /// Validates the basic structure of the msgpack-rpc call and fills `res` /// with the basic response structure. |