Re: How to find the manual (or at least the header)
Re: How to find the manual (or at least the header)
- Subject: Re: How to find the manual (or at least the header)
- From: Cameron Hayne <email@hidden>
- Date: Mon, 27 Jun 2005 12:00:46 -0400
On 27-Jun-05, at 7:27 AM, Stephane Sudre wrote:
For the search solution, it depends if you'd rather spend more
times on writing questions than just cding to the xnu directory and
perform queries such as:
grep host_statistics *
grep host_statistics */*
At one point you will see the definition.
There's also some kind of indexing solution (which I never
remember) which allows to find the source file for a function. Just
ask the question on the darwin-dev mailing list and I'm pretty
sure, they will have the answer.
Ctags will work - but you have to figure out how to install it. It's
a bit of a bother and I haven't used it for several years.
I mostly get along fine with the following Bash function for
searching for specific text in unfamiliar source code:
# grepfind: to grep through files found by find, e.g. grepfind
pattern '*.c'
grepfind () { find . -type f -name "$2" -print0 | xargs -0 grep "$1" ; }
It has the advantage over simple 'grep' that you don't need to know
which sub-directory to target.
--
Cameron Hayne
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden