From 880957ad4e3fc0ff681025f5e29c5eccf797c564 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 10 May 2014 00:53:36 +0400 Subject: Move documentation from function declarations to definitions Uses a perl script to move it (scripts/movedocs.pl) --- src/nvim/os/input.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/nvim/os/input.h') diff --git a/src/nvim/os/input.h b/src/nvim/os/input.h index 298df04578..57602336d5 100644 --- a/src/nvim/os/input.h +++ b/src/nvim/os/input.h @@ -13,10 +13,6 @@ int os_inchar(uint8_t *, int, int32_t, int); bool os_char_avail(void); void os_breakcheck(void); -/// Test whether a file descriptor refers to a terminal. -/// -/// @param fd File descriptor. -/// @return `true` if file descriptor refers to a terminal. bool os_isatty(int fd); #endif // NVIM_OS_INPUT_H -- cgit From 70929f7e1616bab2783cc5735c6061981cda8a0f Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 10 May 2014 17:24:13 +0400 Subject: Add automatic generation of headers - The 'stripdecls.py' script replaces declarations in all headers by includes to generated headers. `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'` was used for this. - Add and integrate gendeclarations.lua into the build system to generate the required includes. - Add -Wno-unused-function - Made a bunch of old-style definitions ANSI This adds a requirement: all type and structure definitions must be present before INCLUDE_GENERATED_DECLARATIONS-protected include. Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is the only exception. --- src/nvim/os/input.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/nvim/os/input.h') diff --git a/src/nvim/os/input.h b/src/nvim/os/input.h index 57602336d5..7543950b4f 100644 --- a/src/nvim/os/input.h +++ b/src/nvim/os/input.h @@ -4,16 +4,7 @@ #include #include -void input_init(void); -bool input_ready(void); -void input_start(void); -void input_stop(void); -uint32_t input_read(char *buf, uint32_t count); -int os_inchar(uint8_t *, int, int32_t, int); -bool os_char_avail(void); -void os_breakcheck(void); - -bool os_isatty(int fd); - +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "os/input.h.generated.h" +#endif #endif // NVIM_OS_INPUT_H - -- cgit