Re: Where is kinfo_proc defined?
Re: Where is kinfo_proc defined?
- Subject: Re: Where is kinfo_proc defined?
- From: "Sherm Pendley" <email@hidden>
- Date: Fri, 28 Mar 2008 21:00:39 -0400
On Fri, Mar 28, 2008 at 8:21 PM, Rick Mann <
email@hidden> wrote:
On Mar 28, 2008, at 5:12 PM, Sherm Pendley wrote:
> sys/sysctl.h
>
> Searching in the help turns up nothing. Command-double-click turns
> up nothing.
>
> Use the terminal, Luke! :-)
>
> find /usr/include -name '*.h' -print0 | xargs -0 grep kinfo_proc
Thanks. I'll keep that around. But really, Xcode should handle this.
You're right - it should.
How do I know it's in /usr and not in /System/Library?
You don't. If you knew where it was, you wouldn't have asked. :-)
Am I supposed
to check in multiple places each time (which is very often) Xcode
doesn't find something?
If you find (lol) yourself needing to do this often, you could do what any good *nix user would do: write a script. :-)
#!/bin/sh
for name in $@ ; do
find /usr/include -name '*.h' -print0 | xargs -0 grep $name
find /System/Library -name '*.h' -print0 | xargs -0 grep $name
find /Library -name '*.h' -print0 | xargs -0 grep $name
done
Save that as "find-def", then just "find-def kinfo_proc" whenever you need it. Someone with sufficient AppleScript-fu (which I lack, sorry) could probably hook this into Xcode's script menu, so that it finds the currently selected text instead of the command-line arguments.
Yes, it's klunky, and no, you're not "supposed" to have to do this. It's a workaround - klunky goes with the territory.
sherm--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden