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/menu.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/menu.c')
-rw-r--r-- | src/nvim/menu.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c index 0f86a65bb5..f1e305f625 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -32,29 +32,13 @@ #define MENUDEPTH 10 /* maximum depth of menus */ -static int add_menu_path(char_u *, vimmenu_T *, int *, char_u *); -static int menu_nable_recurse(vimmenu_T *menu, char_u *name, int modes, - int enable); -static int remove_menu(vimmenu_T **, char_u *, int, int silent); -static void free_menu(vimmenu_T **menup); -static void free_menu_string(vimmenu_T *, int); -static int show_menus(char_u *, int); -static void show_menus_recursive(vimmenu_T *, int, int); -static int menu_name_equal(char_u *name, vimmenu_T *menu); -static int menu_namecmp(char_u *name, char_u *mname); -static int get_menu_cmd_modes(char_u *, int, int *, int *); -static char_u *popup_mode_name(char_u *name, int idx); -static char_u *menu_text(char_u *text, int *mnemonic, char_u **actext); - - -static int menu_is_hidden(char_u *name); -static int menu_is_tearoff(char_u *name); - -static char_u *menu_skip_part(char_u *p); -static char_u *menutrans_lookup(char_u *name, int len); -static void menu_unescape_name(char_u *p); - -static char_u *menu_translate_tab_and_shift(char_u *arg_start); + +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "menu.c.generated.h" +#endif + + + /* The character for each menu mode */ static char_u menu_mode_chars[] = {'n', 'v', 's', 'o', 'i', 'c', 't'}; |