diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/diff.c | 1 | ||||
-rw-r--r-- | src/ex_docmd.c | 1 | ||||
-rw-r--r-- | src/misc1.c | 1 | ||||
-rw-r--r-- | src/misc2.c | 1 | ||||
-rw-r--r-- | src/os/fs.c (renamed from src/io.c) | 9 | ||||
-rw-r--r-- | src/os/mem.c (renamed from src/os.c) | 7 | ||||
-rw-r--r-- | src/os/os.h | 4 | ||||
-rw-r--r-- | src/os_unix.c | 1 | ||||
-rw-r--r-- | src/proto/os_unix.pro | 2 | ||||
-rw-r--r-- | src/window.c | 1 |
11 files changed, 19 insertions, 13 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e355979723..8adfa9fff8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,9 +10,9 @@ endforeach() list(REMOVE_ITEM NEOVIM_SOURCES ${to_remove}) list(APPEND NEOVIM_SOURCES "${PROJECT_BINARY_DIR}/config/auto/pathdef.c") -file( GLOB IO_SOURCES io/*.c ) +file( GLOB OS_SOURCES os/*.c ) -add_executable (nvim ${NEOVIM_SOURCES} ${IO_SOURCES}) +add_executable (nvim ${NEOVIM_SOURCES} ${OS_SOURCES}) target_link_libraries (nvim m uv ${CMAKE_THREAD_LIBS_INIT}) diff --git a/src/diff.c b/src/diff.c index 61c91f248d..166b40ee0c 100644 --- a/src/diff.c +++ b/src/diff.c @@ -12,6 +12,7 @@ */ #include "vim.h" +#include "os/os.h" static int diff_busy = FALSE; /* ex_diffgetput() is busy */ diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 942a0f28c5..0a31ccc108 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -12,6 +12,7 @@ */ #include "vim.h" +#include "os/os.h" static int quitmore = 0; static int ex_pressedreturn = FALSE; diff --git a/src/misc1.c b/src/misc1.c index 3f1e32bc69..98ed65a08b 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -13,6 +13,7 @@ #include "vim.h" #include "version.h" +#include "os/os.h" static char_u *vim_version_dir __ARGS((char_u *vimdir)); static char_u *remove_tail __ARGS((char_u *p, char_u *pend, char_u *name)); diff --git a/src/misc2.c b/src/misc2.c index e59ccf6626..da90eedb55 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -11,6 +11,7 @@ * misc2.c: Various functions. */ #include "vim.h" +#include "os/os.h" static char_u *username = NULL; /* cached result of mch_get_user_name() */ diff --git a/src/io.c b/src/os/fs.c index f75f6a03ea..358b07e57b 100644 --- a/src/io.c +++ b/src/os/fs.c @@ -8,15 +8,14 @@ */ /* - * io.c -- filesystem access, event loop etc. + * fs.c -- filesystem access */ -#include "vim.h" +#include <uv.h> -#include "uv.h" +#include "os.h" -int mch_chdir(char *path) -{ +int mch_chdir(char *path) { if (p_verbose >= 5) { verbose_enter(); smsg((char_u *)"chdir(%s)", path); diff --git a/src/os.c b/src/os/mem.c index c61259dd55..20abd58261 100644 --- a/src/os.c +++ b/src/os/mem.c @@ -11,16 +11,15 @@ * os.c -- OS-level calls to query hardware, etc. */ -#include "vim.h" +#include <uv.h> -#include "uv.h" +#include "os.h" /* * Return total amount of memory available in Kbyte. * Doesn't change when memory has been allocated. */ -long_u mch_total_mem(int special) -{ +long_u mch_total_mem(int special) { /* We need to return memory in *Kbytes* but uv_get_total_memory() returns the * number of bytes of total memory. */ return uv_get_total_memory() >> 10; diff --git a/src/os/os.h b/src/os/os.h new file mode 100644 index 0000000000..f344f180df --- /dev/null +++ b/src/os/os.h @@ -0,0 +1,4 @@ +#include "../vim.h" + +long_u mch_total_mem(int special); +int mch_chdir(char *path); diff --git a/src/os_unix.c b/src/os_unix.c index f67307346e..f65b285ba7 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -28,6 +28,7 @@ # define select select_declared_wrong #include "vim.h" +#include "os/os.h" #include "os_unixx.h" /* unix includes for os_unix.c only */ diff --git a/src/proto/os_unix.pro b/src/proto/os_unix.pro index 3c97345d00..7c5c62a786 100644 --- a/src/proto/os_unix.pro +++ b/src/proto/os_unix.pro @@ -1,9 +1,7 @@ /* os_unix.c */ -int mch_chdir __ARGS((char *path)); void mch_write __ARGS((char_u *s, int len)); int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt)); int mch_char_avail __ARGS((void)); -long_u mch_total_mem __ARGS((int special)); void mch_delay __ARGS((long msec, int ignoreinput)); int mch_stackcheck __ARGS((char *p)); void mch_startjmp __ARGS((void)); diff --git a/src/window.c b/src/window.c index 29c82e4086..5256fbd1fa 100644 --- a/src/window.c +++ b/src/window.c @@ -8,6 +8,7 @@ */ #include "vim.h" +#include "os/os.h" static int path_is_url __ARGS((char_u *p)); static void win_init __ARGS((win_T *newp, win_T *oldp, int flags)); |