comparison src/menu.c @ 1880:e5602d92da8c v7.2.177

updated for version 7.2-177
author vimboss
date Sat, 16 May 2009 15:31:32 +0000
parents 421a77b136c2
children c8f343a465a2
comparison
equal deleted inserted replaced
1879:e8eeeff19eae 1880:e5602d92da8c
229 if (STRNCMP(menu_path, "BuiltIn", 7) == 0) 229 if (STRNCMP(menu_path, "BuiltIn", 7) == 0)
230 { 230 {
231 if (skipdigits(menu_path + 7) == p) 231 if (skipdigits(menu_path + 7) == p)
232 { 232 {
233 menuarg.iconidx = atoi((char *)menu_path + 7); 233 menuarg.iconidx = atoi((char *)menu_path + 7);
234 if (menuarg.iconidx >= TOOLBAR_NAME_COUNT) 234 if (menuarg.iconidx >= (int)TOOLBAR_NAME_COUNT)
235 menuarg.iconidx = -1; 235 menuarg.iconidx = -1;
236 else 236 else
237 menuarg.icon_builtin = TRUE; 237 menuarg.icon_builtin = TRUE;
238 } 238 }
239 } 239 }
240 else 240 else
241 { 241 {
242 for (i = 0; i < TOOLBAR_NAME_COUNT; ++i) 242 for (i = 0; i < (int)TOOLBAR_NAME_COUNT; ++i)
243 if (STRNCMP(toolbar_names[i], menu_path, p - menu_path) 243 if (STRNCMP(toolbar_names[i], menu_path, p - menu_path)
244 == 0) 244 == 0)
245 { 245 {
246 menuarg.iconidx = i; 246 menuarg.iconidx = i;
247 break; 247 break;
1339 1339
1340 /* 1340 /*
1341 * Function given to ExpandGeneric() to obtain the list of (sub)menus (not 1341 * Function given to ExpandGeneric() to obtain the list of (sub)menus (not
1342 * entries). 1342 * entries).
1343 */ 1343 */
1344 /*ARGSUSED*/
1345 char_u * 1344 char_u *
1346 get_menu_name(xp, idx) 1345 get_menu_name(xp, idx)
1347 expand_T *xp; 1346 expand_T *xp UNUSED;
1348 int idx; 1347 int idx;
1349 { 1348 {
1350 static vimmenu_T *menu = NULL; 1349 static vimmenu_T *menu = NULL;
1351 char_u *str; 1350 char_u *str;
1352 1351
1376 1375
1377 /* 1376 /*
1378 * Function given to ExpandGeneric() to obtain the list of menus and menu 1377 * Function given to ExpandGeneric() to obtain the list of menus and menu
1379 * entries. 1378 * entries.
1380 */ 1379 */
1381 /*ARGSUSED*/
1382 char_u * 1380 char_u *
1383 get_menu_names(xp, idx) 1381 get_menu_names(xp, idx)
1384 expand_T *xp; 1382 expand_T *xp UNUSED;
1385 int idx; 1383 int idx;
1386 { 1384 {
1387 static vimmenu_T *menu = NULL; 1385 static vimmenu_T *menu = NULL;
1388 static char_u tbuffer[256]; /*hack*/ 1386 static char_u tbuffer[256]; /*hack*/
1389 char_u *str; 1387 char_u *str;
1737 #if defined(FEAT_CMDL_COMPL) \ 1735 #if defined(FEAT_CMDL_COMPL) \
1738 || (defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF)) 1736 || (defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF))
1739 /* 1737 /*
1740 * Return TRUE if the menu is the tearoff menu. 1738 * Return TRUE if the menu is the tearoff menu.
1741 */ 1739 */
1742 /*ARGSUSED*/
1743 static int 1740 static int
1744 menu_is_tearoff(name) 1741 menu_is_tearoff(name)
1745 char_u *name; 1742 char_u *name UNUSED;
1746 { 1743 {
1747 #ifdef FEAT_GUI 1744 #ifdef FEAT_GUI
1748 return (STRCMP(name, TEAR_STRING) == 0); 1745 return (STRCMP(name, TEAR_STRING) == 0);
1749 #else 1746 #else
1750 return FALSE; 1747 return FALSE;