• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Where is kinfo_proc defined?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Where is kinfo_proc defined?
      • From: Chris Espinosa <email@hidden>
References: 
 >Where is kinfo_proc defined? (From: Rick Mann <email@hidden>)
 >Re: Where is kinfo_proc defined? (From: "Sherm Pendley" <email@hidden>)
 >Re: Where is kinfo_proc defined? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Where is kinfo_proc defined?
  • Next by Date: Re: Building kext for 10.3.9 and/or 10.4 with Xcode 3 on Leopard
  • Previous by thread: Re: Where is kinfo_proc defined?
  • Next by thread: Re: Where is kinfo_proc defined?
  • Index(es):
    • Date
    • Thread