santosh wrote:
> hankssong wrote:
>
>> hi all, I'm wondering how to locate the C header file where
>> defines some struct variable,macro and function.
>> In the MSDN, we can easily solve it by using INDEX search;
>> but how we can do it in the Linux environment?
>> I had tried man [1-8]DIR; but I found no result
>> thanks in advance!
>
> Typically they're in /usr/include. Use cat <HEADER> | grep <PATTERN>.
>
> Ask further such questions in comp.os.linux etc.
He can try "cat n869.txt | grep <PATTERN>" also. A suitable
bzipped version of N869 (the draft C99 standard) can be found at:
<http://cbfalconer.home.att.net/download/>
Another useful sequence is:
less -p<PATTERN> <n869.txt
In all cases replace <PATTERN> with the string of interest.
These sequences apply to systems with the appropriate Unix flavored
utilities only. They can be made available on most systems. On
others the n869.txt is still applicable, but how to search it is up
to you.
I simply capture the whole sequence in an alias named 'cstd', so I
don't have to worry about what sort of system I am running.
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>