How can i search for constant definition in linux (in c include files) [closed]
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 :)
精彩评论