Re: exclude #ifdef regions when using gtags

Shigio Yamaguchi <[email protected]>
Newsgroups gmane.comp.gnu.global.general
Message-ID <[email protected]>
Hi,
> is there a way to instruct gtags to disregard parts of source files that are
> encapsulated by a certain #ifdef/'endif preprocessor command? In my case the
> sources I got contain plain text that is used for a proprietary
> documentation tool. The text is encapsulated in
> 
>    #ifdef XXX_DOCUMENTATION
> 
>    #endif
> 
> These #ifdef/#endif are not nested.
> 
> I would hate to remove these comments from the source files because they
> contain valuable information that then wouldn't show up in the browsable
> source files created by htags. I just want gtags to ignore them.

You can hack libutil/token.c.
About C and C++, comment processing is done in nexttoken().
Good luck.
--
Shigio YAMAGUCHI <[email protected]> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.