From da51dc9cf202772f60bd2da975dbef257bd9237c Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Mon, 12 May 2014 02:25:17 +0200 Subject: Introduce nvim namespace: Move files. Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library. --- src/menu.c | 1616 ------------------------------------------------------------ 1 file changed, 1616 deletions(-) delete mode 100644 src/menu.c (limited to 'src/menu.c') diff --git a/src/menu.c b/src/menu.c deleted file mode 100644 index e454b8c971..0000000000 --- a/src/menu.c +++ /dev/null @@ -1,1616 +0,0 @@ -/* - * VIM - Vi IMproved by Bram Moolenaar - * GUI/Motif support by Robert Webb - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - * See README.txt for an overview of the Vim source code. - */ - -/* - * Code for menus. Used for the GUI and 'wildmenu'. - */ - -#include - -#include "vim.h" -#include "menu.h" -#include "charset.h" -#include "eval.h" -#include "ex_docmd.h" -#include "getchar.h" -#include "memory.h" -#include "message.h" -#include "misc1.h" -#include "misc2.h" -#include "keymap.h" -#include "garray.h" -#include "term.h" - - -#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); - -/* The character for each menu mode */ -static char_u menu_mode_chars[] = {'n', 'v', 's', 'o', 'i', 'c', 't'}; - -static char_u e_notsubmenu[] = N_( - "E327: Part of menu-item path is not sub-menu"); -static char_u e_othermode[] = N_("E328: Menu only exists in another mode"); -static char_u e_nomenu[] = N_("E329: No menu \"%s\""); - - -/* - * Do the :menu command and relatives. - */ -void -ex_menu ( - exarg_T *eap /* Ex command arguments */ -) -{ - char_u *menu_path; - int modes; - char_u *map_to; - int noremap; - int silent = FALSE; - int special = FALSE; - int unmenu; - char_u *map_buf; - char_u *arg; - char_u *p; - int i; - int pri_tab[MENUDEPTH + 1]; - int enable = MAYBE; /* TRUE for "menu enable", FALSE for "menu - * disable */ - vimmenu_T menuarg; - - modes = get_menu_cmd_modes(eap->cmd, eap->forceit, &noremap, &unmenu); - arg = eap->arg; - - for (;; ) { - if (STRNCMP(arg, "