RE: Question on a routine

2003-10-31 Thread David Martin
3:03 AM > To: Palm Developer Forum > Subject: Re: Question on a routine > > > * Keith Rollin <[EMAIL PROTECTED]> [2003-06-26 08:43 -0700]: > > > The prevalent use of this technique throughout the early Palm OS > > source code and samples lead me to believe

Re: Question on a routine

2003-06-27 Thread Lonnie Foster
* Keith Rollin <[EMAIL PROTECTED]> [2003-06-26 08:43 -0700]: > The prevalent use of this technique throughout the early Palm OS > source code and samples lead me to believe that the author just > didn't know about offsetof. It was only in later versions of the OS > and SDK (around Palm OS 3.5, I t

Re: Question on a routine

2003-06-26 Thread DongDong
Thanks. "James" <[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???... > > DongDong wrote: > > > > Why could author assume the base address equal to zero? As most C > > programmer know, memory should be allocated by system. The pointer > > shouldn't be assigned an absolute address, even address 0x

Re: Question on a routine

2003-06-26 Thread James
DongDong wrote: > > Why could author assume the base address equal to zero? As most C > programmer know, memory should be allocated by system. The pointer > shouldn't be assigned an absolute address, even address 0x. > > Is the address zero under Palm OS free to use? I'm confused. > Welcome

Re: Question on a routine

2003-06-26 Thread DongDong
Dong [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2003 8:44 AM > To: Palm Developer Forum > Subject: Re: Question on a routine > > Why could author assume the base address equal to zero? As > most C programmer > know, memory should be allocated by system. The pointer shouldn&#

Re: Question on a routine

2003-06-26 Thread DongDong
s > --- > [EMAIL PROTECTED] > > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > DongDong > Sent: Thursday, June 26, 2003 10:23 AM > To: Palm Developer Forum > Subject: Re: Question on a routine > > >

RE: Question on a routine

2003-06-26 Thread Keith Rollin
> From: DongDong [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2003 8:44 AM > To: Palm Developer Forum > Subject: Re: Question on a routine > > Why could author assume the base address equal to zero? As > most C programmer > know, memory should be allocate

RE: Question on a routine

2003-06-26 Thread Keith Rollin
> From: Brian Smith [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2003 8:00 AM > To: Palm Developer Forum > Subject: RE: Question on a routine > > On Thu, 26 Jun 2003 [EMAIL PROTECTED] wrote: > > > Then the expression: > > > > &packed-&

Re: Question on a routine

2003-06-26 Thread DongDong
<[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???... > > Yes, I remember staring at that code myself. It's kind of grungy. > > In: > > LibPackedDBRecord *packed=0; > > "packed" is simply a pointer (32-bits for Palm platform) so this just > initializes it to zero. Typically, you would say it as:

RE: Question on a routine

2003-06-26 Thread dennis
scribed in the "Palm OS Programming Bible". I don't know why the author didn't use it. Dennis Leas --- [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of DongDong Sent: Thursday, June 26, 2003 10:23 AM To: Palm Develop

Re: Question on a routine

2003-06-26 Thread DongDong
But every memory chunk should be locked before use. There is no code to lock that memory chunk. How can it be used? <[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???... > > Yes, I remember staring at that code myself. It's kind of grungy. > > In: > > LibPackedDBRecord *packed=0; > > "packed" is

RE: Question on a routine

2003-06-26 Thread Brian Smith
On Thu, 26 Jun 2003 [EMAIL PROTECTED] wrote: > Then the expression: > > &packed->status > > is the offset of the "status" member from the base address of a > LibPackedDBRecord. Note that &packed->status does not reference the > value of "status" but only yields the offset of "status". DmWr

RE: Question on a routine

2003-06-26 Thread dennis
Yes, I remember staring at that code myself. It's kind of grungy. In: LibPackedDBRecord *packed=0; "packed" is simply a pointer (32-bits for Palm platform) so this just initializes it to zero. Typically, you would say it as: LibPackedDBRecord *packed=NULL; but the author (I t