API: Refactor: Move non-public files to private subdirectory

This commit is contained in:
Thiago de Arruda 2014-05-23 15:49:25 -03:00
parent 399a0e3740
commit 72e3125f45
13 changed files with 20 additions and 29 deletions

View File

@ -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()

View File

@ -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"

View File

@ -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
///

View File

@ -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"

View File

@ -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) \

View File

@ -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)
{

View File

@ -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
///

View File

@ -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"

View File

@ -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.
///

View File

@ -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"

View File

@ -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
///

View File

@ -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.