开发者

How can i search for constant definition in linux (in c include files) [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_如何学运维 Closed 10 years ago.

i am just wondering ..there is a command called whereis in linux and used to locate functions

and man command shows manual even for c functions ...

but what about constant definitions ..should i use find or grep for that ..or is there any easier way ?


http://ctags.sourceforge.net/

"Ctags generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility."

For whatever editor you usually use, google "ctags


Try identifier search. It has saved me a bunch of time: http://www.cs.fsu.edu/~baker/devices/lxr/http/ident

Edit: although this is really only helpful for grepping through the kernel source :-\


GNU GLOBAL is a source code tagging system that works the same way across diverse environments (emacs, vi, less, bash, web browser, etc). You can locate objects in source files and move there easily. It is useful for hacking a large project containing many subdirectories, many #ifdef and many main() functions. It is similar to ctags or etags but is different from them at the point of independence of any editor. It runs on a UNIX(POSIX) compatible operating system like GNU and BSD.

Have fun :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜