• 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
Help with POSIX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with POSIX


  • Subject: Help with POSIX
  • From: Vince Ackerman <email@hidden>
  • Date: Fri, 18 May 2007 07:32:07 -0700

Maybe this isn't the right forum for this question. I looked at the other Apple Mailing lists and they don't seem to apply. If I missed something forgive me in advance, but I'm a Newbie trying to understand some C Code that I'm trying to port to a Cocoa app I'm writing.


Could someone explain the "_t" characters following this typedef:


typedef enum {p_sync,p_addr,p_cmd1,p_cmd2,p_data1,p_data2,p_cksum} pelco_t;


Later in the code the author declares a variable:

unsigned char pelco[7];


This is confusing to me. Does the compiler drop the "_t" and know that this applies to the char array defined as "pelco" ? I see no other reference defining this array other than code loading up the bytes:


- (void)turnOff
{

	memset(pelco,0,sizeof(pelco));
	pelco[p_sync] = 0xff;
	pelco[p_addr] = addr;
	pelco[p_cmd1] = 0x08;
	pelcoChecksum();
	pelcoWrite(pelco,sizeof(pelco));
}



In trying to understand this I see references to POSIX reserving the use of the "_t" format but not how to use it.
I'm sure this is a totally dumb question, but would appreciate any sort of enlightenment.


Vince
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Help with POSIX
      • From: Charles Steinman <email@hidden>
  • Prev by Date: Re: NSTableColumn binding problem
  • Next by Date: Obtaining the top-level objects from the main NIB file
  • Previous by thread: Re:Fill text in a circle path - NSVIEW
  • Next by thread: Re: Help with POSIX
  • Index(es):
    • Date
    • Thread