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/strings.h | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'src/nvim/strings.h') diff --git a/src/nvim/strings.h b/src/nvim/strings.h index aec9e4d06d..fcc88763c2 100644 --- a/src/nvim/strings.h +++ b/src/nvim/strings.h @@ -1,30 +1,7 @@ #ifndef NVIM_STRINGS_H #define NVIM_STRINGS_H -#include "func_attr.h" - -char_u *vim_strsave(char_u *string) FUNC_ATTR_NONNULL_RET; -char_u *vim_strnsave(char_u *string, int len) FUNC_ATTR_NONNULL_RET; -char_u *vim_strsave_escaped(char_u *string, char_u *esc_chars); -char_u *vim_strsave_escaped_ext(char_u *string, char_u *esc_chars, - int cc, - int bsl); -char_u *vim_strsave_shellescape(char_u *string, bool do_special, bool do_newline); -char_u *vim_strsave_up(char_u *string); -char_u *vim_strnsave_up(char_u *string, int len); -void vim_strup(char_u *p); -char_u *strup_save(char_u *orig); -void copy_spaces(char_u *ptr, size_t count); -void copy_chars(char_u *ptr, size_t count, int c); -void del_trailing_spaces(char_u *ptr); -void vim_strncpy(char_u *to, char_u *from, size_t len); -void vim_strcat(char_u *to, char_u *from, size_t tosize); -int vim_stricmp(char *s1, char *s2); -int vim_strnicmp(char *s1, char *s2, size_t len); -char_u *vim_strchr(char_u *string, int c); -char_u *vim_strbyte(char_u *string, int c); -char_u *vim_strrchr(char_u *string, int c); -int vim_isspace(int x); -void sort_strings(char_u **files, int count); -char_u *concat_str(char_u *str1, char_u *str2); +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "strings.h.generated.h" #endif +#endif // NVIM_STRINGS_H -- cgit