"cscope -d" can't find trailer offset if path contains space (was: An error when I use cscope in vim) - Editors

This is a discussion on "cscope -d" can't find trailer offset if path contains space (was: An error when I use cscope in vim) - Editors ; Bug fix requested submitted for cscope via sourceforge: This problem arose when using vim, but also appears when using "cscope -d". I get the error "cannot read trailer offset from file cscope.out". I browsed build.c to find that it is ...

+ Reply to Thread
Results 1 to 6 of 6

"cscope -d" can't find trailer offset if path contains space (was: An error when I use cscope in vim)

  1. Default "cscope -d" can't find trailer offset if path contains space (was: An error when I use cscope in vim)

    Bug fix requested submitted for cscope via sourceforge:

    This problem arose when using vim, but also appears when using "cscope
    -d". I get the error "cannot read trailer offset from file
    cscope.out". I browsed build.c to find that it is caused when reading
    in a single number with fscanf. To see what could be confusing fscanf,
    I found the context of the "trailer offset" from
    http://www1.bell-labs.com/project/ww...pe/cscope.html, which
    shows that the number to be read occupies a single line along with
    other space-delimited data, including the specification of the current
    directory. The space delimiting will get messed up if the current
    directory contains spaces, which is often the case in Windows and
    Cygwin (though it can also be the case in *nix). P.S.: It also happens
    with mlcscope.


  2. Default Re: "cscope -d" can't find trailer offset if path contains space (was: An error when I use cscope in vim)


    Mister.Fred.Ma@gmail.com wrote:
    > Bug fix requested submitted for cscope via sourceforge:
    >
    > This problem arose when using vim, but also appears when using "cscope
    > -d". I get the error "cannot read trailer offset from file
    > cscope.out". I browsed build.c to find that it is caused when reading
    > in a single number with fscanf. To see what could be confusing fscanf,
    > I found the context of the "trailer offset" from
    > http://www1.bell-labs.com/project/ww...pe/cscope.html, which
    > shows that the number to be read occupies a single line along with
    > other space-delimited data, including the specification of the current
    > directory. The space delimiting will get messed up if the current
    > directory contains spaces, which is often the case in Windows and
    > Cygwin (though it can also be the case in *nix). P.S.: It also happens
    > with mlcscope.


    I noticed the same problem. It's also the same for Opensource version
    of cscope at http://cscope.sourceforge.net/. The only version that
    works fine with spaces in paths or filenames is a Windows version by
    Sergey Khorev at http://iamphet.nm.ru/cscope/index.html. Note that
    Sergey Khorev's version has modified the database format to get it to
    work but the code was not made public. So there are now effectively 3
    different branches of cscope out there:

    1) bell labs
    - probably lagging behind (2) & (3)

    2) Sourceforge
    - most active and most up-to-date

    3) Sergey Khorev's
    - based on Sourceforge's but with modified database format to
    support spaces in
    paths and filenames

    /Why Tea


  3. Default Re: "cscope -d" can't find trailer offset if path contains space (was: An error when I use cscope in vim)


    Why Tea wrote:
    > Mister.Fred.Ma@gmail.com wrote:
    > > Bug fix requested submitted for cscope via sourceforge:
    > >
    > > This problem arose when using vim, but also appears when using "cscope
    > > -d". I get the error "cannot read trailer offset from file
    > > cscope.out". I browsed build.c to find that it is caused when reading
    > > in a single number with fscanf. To see what could be confusing fscanf,
    > > I found the context of the "trailer offset" from
    > > http://www1.bell-labs.com/project/ww...pe/cscope.html, which
    > > shows that the number to be read occupies a single line along with
    > > other space-delimited data, including the specification of the current
    > > directory. The space delimiting will get messed up if the current
    > > directory contains spaces, which is often the case in Windows and
    > > Cygwin (though it can also be the case in *nix). P.S.: It also happens
    > > with mlcscope.

    >
    > I noticed the same problem. It's also the same for Opensource version
    > of cscope at http://cscope.sourceforge.net/. The only version that
    > works fine with spaces in paths or filenames is a Windows version by
    > Sergey Khorev at http://iamphet.nm.ru/cscope/index.html. Note that
    > Sergey Khorev's version has modified the database format to get it to
    > work but the code was not made public. So there are now effectively 3
    > different branches of cscope out there:
    >
    > 1) bell labs
    > - probably lagging behind (2) & (3)
    >
    > 2) Sourceforge
    > - most active and most up-to-date
    >
    > 3) Sergey Khorev's
    > - based on Sourceforge's but with modified database format to
    > support spaces in
    > paths and filenames


    I was finding the problem with the public exuberant cscope that you
    referred to, as well as the mlcscope that comes with cygwin.
    Hopefully, Sergey's mods will somehow find it's way to both.

    Fred


  4. Default Re: "cscope -d" can't find trailer offset if path contains space (was: An error when I use cscope in vim)


    Mister.Fred...@gmail.com wrote:
    > Why Tea wrote:
    > > Mister.Fred.Ma@gmail.com wrote:
    > > > Bug fix requested submitted for cscope via sourceforge:
    > > >
    > > > This problem arose when using vim, but also appears when using "cscope
    > > > -d". I get the error "cannot read trailer offset from file
    > > > cscope.out". I browsed build.c to find that it is caused when reading
    > > > in a single number with fscanf. To see what could be confusing fscanf,
    > > > I found the context of the "trailer offset" from
    > > > http://www1.bell-labs.com/project/ww...pe/cscope.html, which
    > > > shows that the number to be read occupies a single line along with
    > > > other space-delimited data, including the specification of the current
    > > > directory. The space delimiting will get messed up if the current
    > > > directory contains spaces, which is often the case in Windows and
    > > > Cygwin (though it can also be the case in *nix). P.S.: It also happens
    > > > with mlcscope.

    > >
    > > I noticed the same problem. It's also the same for Opensource version
    > > of cscope at http://cscope.sourceforge.net/. The only version that
    > > works fine with spaces in paths or filenames is a Windows version by
    > > Sergey Khorev at http://iamphet.nm.ru/cscope/index.html. Note that
    > > Sergey Khorev's version has modified the database format to get it to
    > > work but the code was not made public. So there are now effectively 3
    > > different branches of cscope out there:
    > >
    > > 1) bell labs
    > > - probably lagging behind (2) & (3)
    > >
    > > 2) Sourceforge
    > > - most active and most up-to-date
    > >
    > > 3) Sergey Khorev's
    > > - based on Sourceforge's but with modified database format to
    > > support spaces in
    > > paths and filenames

    >
    > I was finding the problem with the public exuberant cscope that you
    > referred to, as well as the mlcscope that comes with cygwin.
    > Hopefully, Sergey's mods will somehow find it's way to both.
    >
    > Fred


    Is there an exuberant cscope? I thought it was an exuberant ctags.


  5. Default Re: "cscope -d" can't find trailer offset if path contains space (was: An error when I use cscope in vim)


    Why Tea wrote:
    > Mister.Fred...@gmail.com wrote:
    > > Why Tea wrote:
    > > > Mister.Fred.Ma@gmail.com wrote:
    > > > > Bug fix requested submitted for cscope via sourceforge:
    > > > >
    > > > > This problem arose when using vim, but also appears when using "cscope
    > > > > -d". I get the error "cannot read trailer offset from file
    > > > > cscope.out". I browsed build.c to find that it is caused when reading
    > > > > in a single number with fscanf. To see what could be confusing fscanf,
    > > > > I found the context of the "trailer offset" from
    > > > > http://www1.bell-labs.com/project/ww...pe/cscope.html, which
    > > > > shows that the number to be read occupies a single line along with
    > > > > other space-delimited data, including the specification of the current
    > > > > directory. The space delimiting will get messed up if the current
    > > > > directory contains spaces, which is often the case in Windows and
    > > > > Cygwin (though it can also be the case in *nix). P.S.: It also happens
    > > > > with mlcscope.
    > > >
    > > > I noticed the same problem. It's also the same for Opensource version
    > > > of cscope at http://cscope.sourceforge.net/. The only version that
    > > > works fine with spaces in paths or filenames is a Windows version by
    > > > Sergey Khorev at http://iamphet.nm.ru/cscope/index.html. Note that
    > > > Sergey Khorev's version has modified the database format to get it to
    > > > work but the code was not made public. So there are now effectively 3
    > > > different branches of cscope out there:
    > > >
    > > > 1) bell labs
    > > > - probably lagging behind (2) & (3)
    > > >
    > > > 2) Sourceforge
    > > > - most active and most up-to-date
    > > >
    > > > 3) Sergey Khorev's
    > > > - based on Sourceforge's but with modified database format to
    > > > support spaces in
    > > > paths and filenames

    > >
    > > I was finding the problem with the public exuberant cscope that you
    > > referred to, as well as the mlcscope that comes with cygwin.
    > > Hopefully, Sergey's mods will somehow find it's way to both.

    >
    > Is there an exuberant cscope? I thought it was an exuberant ctags.


    Gosh, you're right. Since I ramped up on both at the same time (for
    use with vim), I tend to think of them as the same, even though I don't
    use ctags any more. When you're using files of an unsupported
    language, you tend to use the regular expression search of cscope.
    Thanks for the reminder.


  6. Default Re: "cscope -d" can't find trailer offset if path contains space (was: An error when I use cscope in vim)


    Mister.Fred.Ma@gmail.com wrote:
    > Why Tea wrote:
    > > Mister.Fred...@gmail.com wrote:
    > > > Why Tea wrote:
    > > > > Mister.Fred.Ma@gmail.com wrote:
    > > > > > Bug fix requested submitted for cscope via sourceforge:
    > > > > >
    > > > > > This problem arose when using vim, but also appears when using "cscope
    > > > > > -d". I get the error "cannot read trailer offset from file
    > > > > > cscope.out". I browsed build.c to find that it is caused when reading
    > > > > > in a single number with fscanf. To see what could be confusing fscanf,
    > > > > > I found the context of the "trailer offset" from
    > > > > > http://www1.bell-labs.com/project/ww...pe/cscope.html, which
    > > > > > shows that the number to be read occupies a single line along with
    > > > > > other space-delimited data, including the specification of the current
    > > > > > directory. The space delimiting will get messed up if the current
    > > > > > directory contains spaces, which is often the case in Windows and
    > > > > > Cygwin (though it can also be the case in *nix). P.S.: It also happens
    > > > > > with mlcscope.
    > > > >
    > > > > I noticed the same problem. It's also the same for Opensource version
    > > > > of cscope at http://cscope.sourceforge.net/. The only version that
    > > > > works fine with spaces in paths or filenames is a Windows version by
    > > > > Sergey Khorev at http://iamphet.nm.ru/cscope/index.html. Note that
    > > > > Sergey Khorev's version has modified the database format to get it to
    > > > > work but the code was not made public. So there are now effectively 3
    > > > > different branches of cscope out there:
    > > > >
    > > > > 1) bell labs
    > > > > - probably lagging behind (2) & (3)
    > > > >
    > > > > 2) Sourceforge
    > > > > - most active and most up-to-date
    > > > >
    > > > > 3) Sergey Khorev's
    > > > > - based on Sourceforge's but with modified database format to
    > > > > support spaces in
    > > > > paths and filenames
    > > >
    > > > I was finding the problem with the public exuberant cscope that you
    > > > referred to, as well as the mlcscope that comes with cygwin.
    > > > Hopefully, Sergey's mods will somehow find it's way to both.

    > >
    > > Is there an exuberant cscope? I thought it was an exuberant ctags.

    >
    > Gosh, you're right. Since I ramped up on both at the same time (for
    > use with vim), I tend to think of them as the same, even though I don't
    > use ctags any more. When you're using files of an unsupported
    > language, you tend to use the regular expression search of cscope.
    > Thanks for the reminder.


    I use vi when I don't have access to X. But I mostly use Nedit for
    writing code and have implemented the original macro for cscope
    (http://www.nedit.org/niki/index.php/cscope) with
    the following features:
    1) results are shown in a pop-up picklist
    2) last results are stored in a file for quick retrieval
    3) cscope database can be build thru the macro

    I also use macros for grep with the same features above, as such I have
    a uniform UI for all the searches I need.


+ Reply to Thread

Similar Threads

  1. About -C switch of cscope
    By Application Development in forum Editors
    Replies: 6
    Last Post: 12-01-2006, 07:55 PM
  2. should I use cscope or ctags?
    By Application Development in forum Editors
    Replies: 11
    Last Post: 11-18-2006, 11:33 AM
  3. An error when I use cscope in vim
    By Application Development in forum Editors
    Replies: 2
    Last Post: 09-12-2006, 12:19 AM
  4. The usage of cscope in vim
    By Application Development in forum Editors
    Replies: 0
    Last Post: 08-02-2006, 06:34 AM
  5. "The system cannot find the path specified"
    By Application Development in forum Inetserver
    Replies: 4
    Last Post: 04-01-2005, 11:30 AM