diff options
author | ZyX <kp-pav@ya.ru> | 2014-05-10 17:24:13 +0400 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-02 11:04:17 -0300 |
commit | 70929f7e1616bab2783cc5735c6061981cda8a0f (patch) | |
tree | 4a947af96fa0bac749f843a41e7b6593dd2659c0 /src/nvim/term.c | |
parent | 880957ad4e3fc0ff681025f5e29c5eccf797c564 (diff) | |
download | rneovim-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/term.c')
-rw-r--r-- | src/nvim/term.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/nvim/term.c b/src/nvim/term.c index 932d58f76d..2b2607fb30 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -91,23 +91,14 @@ struct builtin_term { /* start of keys that are not directly used by Vim but can be mapped */ #define BT_EXTRA_KEYS 0x101 -static struct builtin_term *find_builtin_term(char_u *name); -static void parse_builtin_tcap(char_u *s); -static void term_color(char_u *s, int n); -static void gather_termleader(void); -static void req_codes_from_term(void); -static void req_more_codes_from_term(void); -static void got_code_from_term(char_u *code, int len); -static void check_for_codes_from_term(void); +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "term.c.generated.h" +#endif #if defined(FEAT_GUI) \ || (defined(FEAT_MOUSE) && (!defined(UNIX) || defined(FEAT_MOUSE_XTERM) \ || defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE))) static int get_bytes_from_buf(char_u *, char_u *, int); #endif -static void del_termcode_idx(int idx); -static int term_is_builtin(char_u *name); -static int term_7to8bit(char_u *p); -static void switch_to_8bit(void); #ifdef HAVE_TGETENT static char_u *tgetent_error(char_u *, char_u *); @@ -1216,7 +1207,6 @@ static void parse_builtin_tcap(char_u *term) } } } -static void set_color_count(int nr); /* * Set number of colors. @@ -1939,7 +1929,6 @@ char_u *tltoa(unsigned long i) * minimal tgoto() implementation. * no padding and we only parse for %i %d and %+char */ -static char *tgoto(char *, int, int); static char *tgoto(char *cm, int x, int y) { @@ -2064,7 +2053,6 @@ void out_char(unsigned c) out_flush(); } -static void out_char_nf(unsigned); /* * out_char_nf(c): like out_char(), but don't flush when p_wd is set @@ -2321,8 +2309,6 @@ void ttest(int pairs) } #if defined(FEAT_GUI) || defined(PROTO) -static int get_long_from_buf(char_u *buf, long_u *val); - /* * Interpret the next string of bytes in buf as a long integer, with the most * significant byte first. Note that it is assumed that buf has been through @@ -2922,7 +2908,6 @@ static struct termcode { static int tc_max_len = 0; /* number of entries that termcodes[] can hold */ static int tc_len = 0; /* current number of entries in termcodes[] */ -static int termcode_star(char_u *code, int len); void clear_termcodes(void) { |