bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [feature request] search the place where the header file is included


From: Hideki IWAMOTO
Subject: Re: [feature request] search the place where the header file is included
Date: Wed, 26 Mar 2003 01:54:56 +0900

implemented this function.

On Sun, 16 Mar 2003 11:06:21 +0900, Shigio Yamaguchi wrote...
> > Is it easy to add the function which makes the link
> > to the place which is using the header file to htags?
> 
> Do you mean adding 'INCLUDED FROM' index at the head of *.h files?
> 
>       +-------------------------------------------
>       |libutil/die.h
>       |
>       |/* [<][>][^][v][top][bottom][index][help] */ 
>       |-------------------------------------------
>       |DEFINITIONS
>       |
>       |This source file includes following functions. 
>       |
>       |-------------------------------------------
>       |
> =>Add |INCLUDED FROM
>       |
>       |This source file referred from following places. 
>       |
>       |       libutil/die.c                   ===> go to '#include' in die.c.
>       |       ~~~~~~~~~~~~~
>       |       gtags/gtags.c
>       |       ~~~~~~~~~~~~~
>       |       ...
> 
> I think it is possible. For example,
> 
> 1. Pick up all of '#include'.
> 
>       % global -xg '^[ \t]*#[ \t]*include'
>       ...
>       ^[%20\t]*#[%20\t]*include   30 libutil/global.h #include "die.h"
>       ^[%20\t]*#[%20\t]*include   31 libutil/global.h #include "find.h"
>       ^[%20\t]*#[%20\t]*include   32 libutil/gpathop.c #include <strings.h>
>       ^[%20\t]*#[%20\t]*include   35 libutil/gpathop.c #include "die.h"
>       ...
> 
> 2. Make index from 1.
> 
>       die.h ==> libutil/global.h(30), libutil/gpathop.c(35),...
>       find.h ==> ...
> 
> 2. For each include file, show 'INCLUDED FROM' index.
> 
>       die.h
>       +--------------------------------------
>       |...
>       |       libutil/global.h        => libutil/global.h#30
>       |       ~~~~~~~~~~~~~~~~
>       |       libutil/gpathop.c       => libutil/gpathop.c#35
>       |       ~~~~~~~~~~~~~~~~~
> --
> Shigio Yamaguchi <address@hidden> - Tama Communications Corporation
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

----
Hideki IWAMOTO  address@hidden

Attachment: htags-includefrom.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]