#16 list of #included files


ctags already has the ability to output an entry for
each processed file. A useful extension would be a
field "includes:" that lists the files included with an
#include directive by each file.


  • Darren Hiebert

    Darren Hiebert - 2002-12-21
    • assigned_to: nobody --> dhiebert
  • Darren Hiebert

    Darren Hiebert - 2002-12-21

    Logged In: YES

    Can you provide an explanation of why this would be useful?
    It hardly seems worth the effort. The Perl Programming book
    already includes an example short Perl script which displays
    such information when needed.

  • Matthias S. Benkmann

    Logged In: YES

    A major problem with using ctags info for xref'ing is that
    if you have multiple symbols of the same name in different
    files you don't know which one to link to. The list of
    included files is helpful for cutting down the number of
    choices because a type referenced in the prototype of
    function f() in file F will usually not refer to a type not
    declared either in F or a file that is included in F. That
    there exists other tools to extract this information hardly
    seems like a good reason not to include it in ctags. I'm
    sure a collection of 101 Perl scripts could replace ctags
    completely, but who wants to work with this? Each new
    independent script needs to parse all files again,
    increasing the processing time. A lot of wasted time to
    extract information that should be trivial for ctags to pick up.


Log in to post a comment.