• 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: Control initialised data layout?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Control initialised data layout?


  • Subject: Re: Control initialised data layout?
  • From: glenn andreas <email@hidden>
  • Date: Mon, 30 Jul 2007 09:58:33 -0500


On Jul 30, 2007, at 9:42 AM, Martin Crane wrote:
So, to demonstrate, in the code I have (example, not real!):

static unsigned char gBuffer1[8] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h'};
unsigned char gBuffer2[8] = { 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a'};


and the external app expects to see "abcdefghhgfedcba" in the data area of
the binary.



This isn't a perfect solution (obviously this won't work if you do things like sizeof(g)), but could you do something like:

unsigned char gBuffer1[16] = {'a','b','c','d','e','f','g','h', 'h','g','f','e','d','c','b','a' };
unsigned  char *gBuffer2 = gBuffer1 + 8;




Glenn Andreas                      email@hidden 

 <http://www.gandreas.com/> wicked fun!

quadrium2 | build, mutate, evolve, animate  | images, textures, fractals, art



 _______________________________________________
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

References: 
 >Control initialised data layout? (From: Martin Crane <email@hidden>)
 >Re: Control initialised data layout? (From: "Kyle Sluder" <email@hidden>)
 >Re: Control initialised data layout? (From: Martin Crane <email@hidden>)

  • Prev by Date: Re: Control initialised data layout?
  • Next by Date: Re: Using XCode debugger without XCode project
  • Previous by thread: Re: Control initialised data layout?
  • Next by thread: Re: Control initialised data layout?
  • Index(es):
    • Date
    • Thread