Loading ...
Sorry, an error occurred while loading the content.

compiling problem too many arguments to function do_ecmd

Expand Messages
  • Andrey Voropaev
    Hello! Maybe it is not purely usage case, but it does not look like a development issue either :) I m trying to compile vim7.2. I ve applied all of the patches
    Message 1 of 6 , Nov 3, 2009
    • 0 Attachment
      Hello!

      Maybe it is not purely usage case, but it does not look like a
      development issue either :)

      I'm trying to compile vim7.2. I've applied all of the patches (1-272),
      enabled gtk2 gui and selected FEAT_NORMAL.
      Then I run make and get the following error right on the first file to
      be compiled.

      gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
      -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
      -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
      -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
      -I/usr/include/pixman-1 -I/usr/include/freetype2
      -I/usr/include/libpng12 -O2 -march=athlon64 -pipe -o
      objects/buffer.o buffer.c
      buffer.c: In function 'do_buffer':
      buffer.c:1090: error: too many arguments to function 'do_ecmd'
      buffer.c: In function 'set_curbuf':
      buffer.c:1313: error: too many arguments to function 'buflist_altfpos'
      buffer.c: In function 'buflist_altfpos':
      buffer.c:2847: error: number of arguments doesn't match prototype
      proto/buffer.pro:36: error: prototype declaration
      buffer.c: In function 'do_arg_all':
      buffer.c:4544: error: too many arguments to function 'do_ecmd'
      make: *** [objects/buffer.o] Error 1

      I've checked the prototype

      proto/ex_cmds.pro:int do_ecmd __ARGS((int fnum, char_u *ffname, char_u
      *sfname, exarg_T *eap, linenr_T newlnum, int flags));

      the line 1090 from do_ecmd reads

      retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE,
      forceit ? ECMD_FORCEIT : 0, curwin);


      What am I doing wrong?

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Bram Moolenaar
      ... You must be missing patch 7.2.041. The correct prototype is: int do_ecmd __ARGS((int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum,
      Message 2 of 6 , Nov 3, 2009
      • 0 Attachment
        Andrey Voropaev wrote:

        > Maybe it is not purely usage case, but it does not look like a
        > development issue either :)
        >
        > I'm trying to compile vim7.2. I've applied all of the patches (1-272),
        > enabled gtk2 gui and selected FEAT_NORMAL.
        > Then I run make and get the following error right on the first file to
        > be compiled.
        >
        > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
        > -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
        > -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
        > -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
        > -I/usr/include/pixman-1 -I/usr/include/freetype2
        > -I/usr/include/libpng12 -O2 -march=athlon64 -pipe -o
        > objects/buffer.o buffer.c
        > buffer.c: In function 'do_buffer':
        > buffer.c:1090: error: too many arguments to function 'do_ecmd'
        > buffer.c: In function 'set_curbuf':
        > buffer.c:1313: error: too many arguments to function 'buflist_altfpos'
        > buffer.c: In function 'buflist_altfpos':
        > buffer.c:2847: error: number of arguments doesn't match prototype
        > proto/buffer.pro:36: error: prototype declaration
        > buffer.c: In function 'do_arg_all':
        > buffer.c:4544: error: too many arguments to function 'do_ecmd'
        > make: *** [objects/buffer.o] Error 1
        >
        > I've checked the prototype
        >
        > proto/ex_cmds.pro:int do_ecmd __ARGS((int fnum, char_u *ffname, char_u
        > *sfname, exarg_T *eap, linenr_T newlnum, int flags));
        >
        > the line 1090 from do_ecmd reads
        >
        > retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE,
        > forceit ? ECMD_FORCEIT : 0, curwin);
        >
        >
        > What am I doing wrong?

        You must be missing patch 7.2.041. The correct prototype is:

        int do_ecmd __ARGS((int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags, win_T *oldwin));


        --
        It is illegal for anyone to try and stop a child from playfully jumping over
        puddles of water.
        [real standing law in California, United States of America]

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Andrey Voropaev
        ... Aha. Now I ve applied patches more accurately and everything compiles. Actually, I was doing all of this to find what has happened with Ctrl-U in insert
        Message 3 of 6 , Nov 4, 2009
        • 0 Attachment
          On Tue, Nov 3, 2009 at 6:03 PM, Bram Moolenaar <Bram@...> wrote:
          >
          > You must be missing patch 7.2.041.  The correct prototype is:
          >
          > int do_ecmd __ARGS((int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags, win_T *oldwin));
          >
          >

          Aha. Now I've applied patches more accurately and everything compiles.

          Actually, I was doing all of this to find what has happened with
          Ctrl-U in insert mode. If I compile vim72 with patches 1-100 then
          Ctrl-U in insert mode removes only inserted text and not the indent.
          After applying patches 101-200 this behavior goes away. Now the Ctrl-U
          always places cursor to the very beginning of the line. I don't think
          this is correct behavior. At least documentation says that it should
          remove the typed characters only and leave the indent.

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Andrey Voropaev
          On Wed, Nov 4, 2009 at 10:15 AM, Andrey Voropaev ... I ve identified the exact patch which does this. It is 7.2.169
          Message 4 of 6 , Nov 4, 2009
          • 0 Attachment
            On Wed, Nov 4, 2009 at 10:15 AM, Andrey Voropaev
            <voropaev.andrey@...> wrote:
            > Actually, I was doing all of this to find what has happened with
            > Ctrl-U in insert mode. If I compile vim72 with patches 1-100 then
            > Ctrl-U in insert mode removes only inserted text and not the indent.
            > After applying patches 101-200 this behavior goes away. Now the Ctrl-U
            > always places cursor to the very beginning of the line. I don't think
            > this is correct behavior. At least documentation says that it should
            > remove the typed characters only and leave the indent.

            I've identified the exact patch which does this. It is 7.2.169

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Andy Wokula
            ... And the following looks wrong in the patch: One occurrence of temp not replaced by save_col . ... *************** [...] *** 8510,8520 **** #endif ) { !
            Message 5 of 6 , Nov 4, 2009
            • 0 Attachment
              Andrey Voropaev schrieb:
              > On Wed, Nov 4, 2009 at 10:15 AM, Andrey Voropaev
              > <voropaev.andrey@...> wrote:
              >> Actually, I was doing all of this to find what has happened with
              >> Ctrl-U in insert mode. If I compile vim72 with patches 1-100 then
              >> Ctrl-U in insert mode removes only inserted text and not the indent.
              >> After applying patches 101-200 this behavior goes away. Now the Ctrl-U
              >> always places cursor to the very beginning of the line. I don't think
              >> this is correct behavior. At least documentation says that it should
              >> remove the typed characters only and leave the indent.
              >
              > I've identified the exact patch which does this. It is 7.2.169

              And the following looks wrong in the patch:
              One occurrence of "temp" not replaced by "save_col".

              *** ../vim-7.2.168/src/edit.c 2009-05-13 12:46:36.000000000 +0200
              --- src/edit.c 2009-05-13 18:29:21.000000000 +0200
              ***************

              [...]

              *** 8510,8520 ****
              #endif
              )
              {
              ! temp = curwin->w_cursor.col;
              beginline(BL_WHITE);
              if (curwin->w_cursor.col < (colnr_T)temp)
              mincol = curwin->w_cursor.col;
              ! curwin->w_cursor.col = temp;
              }

              /*
              --- 8516,8526 ----
              #endif
              )
              {
              ! save_col = curwin->w_cursor.col;
              beginline(BL_WHITE);
              if (curwin->w_cursor.col < (colnr_T)temp)
              mincol = curwin->w_cursor.col;
              ! curwin->w_cursor.col = save_col;
              }

              /*

              --
              Andy

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Bram Moolenaar
              ... Thanks for pinpointing this mistake! -- A parent can be arrested if his child cannot hold back a burp during a church service. [real standing law in
              Message 6 of 6 , Nov 5, 2009
              • 0 Attachment
                Andy Wokula wrote:

                > Andrey Voropaev schrieb:
                > > On Wed, Nov 4, 2009 at 10:15 AM, Andrey Voropaev
                > > <voropaev.andrey@...> wrote:
                > >> Actually, I was doing all of this to find what has happened with
                > >> Ctrl-U in insert mode. If I compile vim72 with patches 1-100 then
                > >> Ctrl-U in insert mode removes only inserted text and not the indent.
                > >> After applying patches 101-200 this behavior goes away. Now the Ctrl-U
                > >> always places cursor to the very beginning of the line. I don't think
                > >> this is correct behavior. At least documentation says that it should
                > >> remove the typed characters only and leave the indent.
                > >
                > > I've identified the exact patch which does this. It is 7.2.169
                >
                > And the following looks wrong in the patch:
                > One occurrence of "temp" not replaced by "save_col".

                Thanks for pinpointing this mistake!

                --
                A parent can be arrested if his child cannot hold back a burp during a church
                service.
                [real standing law in Nebraska, United States of America]

                /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                \\\ download, build and distribute -- http://www.A-A-P.org ///
                \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              Your message has been successfully submitted and would be delivered to recipients shortly.