Hi all,

This patch fails to compile on Windows (but I suspect the problem is not restricted that platform) if FEAT_MULTI_LANG is not defined:

<snip>
gcc -c -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_BIG -DFEAT_MBYTE -pipe -w -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -s menu.c -o obj/menu.o
menu.c: In function 'get_menu_name':
menu.c:1343: error: 'should_advance' undeclared (first use in this function)
menu.c:1343: error: (Each undeclared identifier is reported only once
menu.c:1343: error: for each function it appears in.)
menu.c: In function 'get_menu_names':
menu.c:1404: error: 'should_advance' undeclared (first use in this function)
menu.c: In function 'menu_name_equal':
menu.c:1509: error: 'vimmenu_T' has no member named 'en_name'
menu.c:1510: error: 'vimmenu_T' has no member named 'en_name'
menu.c:1511: error: 'vimmenu_T' has no member named 'en_dname'
make: *** [obj/menu.o] Error 1
</snip>

The attached patch seems to fix it.

Cheers
John

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
*** menu.c      2010-05-16 06:45:56.663627200 +1000
--- menu.c.new  2010-05-16 06:45:34.576363800 +1000
***************
*** 1340,1346 ****
--- 1340,1348 ----
      if (idx == 0)         /* first call: start at first item */
      {
        menu = expand_menu;
+ #ifdef FEAT_MULTI_LANG
        should_advance = FALSE;
+ #endif
      }
  
      /* Skip PopUp[nvoci]. */
***************
*** 1401,1407 ****
--- 1403,1411 ----
      if (idx == 0)         /* first call: start at first item */
      {
        menu = expand_menu;
+ #ifdef FEAT_MULTI_LANG
        should_advance = FALSE;
+ #endif
      }
  
      /* Skip Browse-style entries, popup menus and separators. */
***************
*** 1506,1515 ****
--- 1510,1521 ----
      char_u    *name;
      vimmenu_T *menu;
  {
+ #ifdef FEAT_MULTI_LANG
      if (menu->en_name != NULL
            && (menu_namecmp(name,menu->en_name)
                || menu_namecmp(name,menu->en_dname)))
          return TRUE;
+ #endif
      return menu_namecmp(name, menu->name) || menu_namecmp(name, menu->dname);
  }
  

Raspunde prin e-mail lui