X-Git-Url: http://git.openafs.org/?p=openafs-wiki.git;a=blobdiff_plain;f=AFSLore%2FCodeArchitecture.mdwn;h=187420d9523345c61edb0eb1be911562f8978a14;hp=f7679e2b7a32995f87554db7c5b8055b11f7c461;hb=988b33b0e46155266b99979ea0ab8d6e4f51ab1e;hpb=53957fcb19771e7db14950ba81b7d4e86532f412 diff --git a/AFSLore/CodeArchitecture.mdwn b/AFSLore/CodeArchitecture.mdwn index f7679e2..187420d 100644 --- a/AFSLore/CodeArchitecture.mdwn +++ b/AFSLore/CodeArchitecture.mdwn @@ -55,13 +55,25 @@ In other words, if something starts with BOZO\_, you know that it is generated b In addition to the package name, also note that only rxstat uses an M prefix; all others use S. +- Assuming you have a fairly modern grep, you can use its recursive facility: + + $ **grep -r regex .** + +and find every time appears in a file + +- If you're looking for one specific word, the -w switch is your friend as well. + + $ **egrep -w -r VFORMAT .** + +will find all instances of **VFORMAT** but will not find **ABVFORMAT** + - cscope: a source code browser, linked to your editor. Setup is simple: cd to your source tree and run: - cscope -R -b + $ **cscope -R -b** Then run - cscope -d + $ **cscope -d** to start. The interface is simple. I tend to use it for finding things, but not necessarily for editing. When I'm studying the source, trying to understand how components link together, or bug-hunting, I tend to live inside `cscope`.