aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/strings.h
diff options
context:
space:
mode:
authorZyX <kp-pav@ya.ru>2014-05-10 17:24:13 +0400
committerThiago de Arruda <tpadilha84@gmail.com>2014-06-02 11:04:17 -0300
commit70929f7e1616bab2783cc5735c6061981cda8a0f (patch)
tree4a947af96fa0bac749f843a41e7b6593dd2659c0 /src/nvim/strings.h
parent880957ad4e3fc0ff681025f5e29c5eccf797c564 (diff)
downloadrneovim-70929f7e1616bab2783cc5735c6061981cda8a0f.tar.gz
rneovim-70929f7e1616bab2783cc5735c6061981cda8a0f.tar.bz2
rneovim-70929f7e1616bab2783cc5735c6061981cda8a0f.zip
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.
Diffstat (limited to 'src/nvim/strings.h')
-rw-r--r--src/nvim/strings.h29
1 files changed, 3 insertions, 26 deletions
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