• 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
Calling BSD from Cocoa and/or CFM?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling BSD from Cocoa and/or CFM?


  • Subject: Calling BSD from Cocoa and/or CFM?
  • From: Zack Morris <email@hidden>
  • Date: Mon, 21 Jan 2002 16:52:57 -0700

Hi, I am new to the list and have a newbie question (for future
reference, is there a better list to ask about pure OS X questions?). How
do I call BSD UNIX routines from OS X? Specifically, I need to call
getpwent() which is inside the pwd.h header. You can read about it by doing
a "man getpwent" search in google. For some reason it didn't show up in man
on my computer. I have searched my drive and cannot find the pwd.h file or
getpwent in the contents. I downloaded the developer tools but that did not
help. I assume that I need to download and install some unix libraries, but
I don't know how. I know that the routine exists because I can call it from
perl on the command line. Here is my test file called "getnames.pl":

#!/usr/bin/perl

setpwent();

while( 1 )
{
@newuserpw = getpwent();
if( @newuserpw != 0 )
{
printf "@newuserpw\n";
}
else
{
last;
}
}

from the command line:

perl getnames.pl

It then outputs a list of users on this machine. I just need a way to call
it from c++, preferrably from codewarrior. Also, how do I do a lookup on
the name and call it from a carbon CFM project (similar to RezLib's method
of calling CF... routine for setting resolution). I am using OS X 10.1.2
Build 5P48. Thank you for your time,

Zack Morris
Z Sculpt Entertainment
email@hidden
http://www.zsculpt.com


  • Follow-Ups:
    • Re: Calling BSD from Cocoa and/or CFM?
      • From: email@hidden
    • Re: Calling BSD from Cocoa and/or CFM?
      • From: Ricky Sharp <email@hidden>
    • Re: Calling BSD from Cocoa and/or CFM?
      • From: James Montgomerie <email@hidden>
    • Re: Calling BSD from Cocoa and/or CFM?
      • From: Andrew Pinski <email@hidden>
References: 
 >Re: NSBrowser clearing (pt.2) (From: Eric Ridge <email@hidden>)

  • Prev by Date: Re: NSGlyph is still a puzzle
  • Next by Date: Re: NSGlyph is still a puzzle
  • Previous by thread: Re: NSBrowser clearing (pt.2)
  • Next by thread: Re: Calling BSD from Cocoa and/or CFM?
  • Index(es):
    • Date
    • Thread