On Thu, Apr 25, 2002 at 01:56:19PM -0700, Danny Epstein wrote:
> I just did some experiments with an older version of CodeWarrior (68K). I
> found that you could use:
>
> #pragma pack(push, 1)
> typedef struct {...} FooType;
> #pragma pack(pop)
[...]
> to eliminate padding. This
I just did some experiments with an older version of CodeWarrior (68K). I
found that you could use:
#pragma pack(push, 1)
typedef struct {...} FooType;
#pragma pack(pop)
or:
#pragma options align=packed
typedef struct {...} FooType;
#pragma option
> > typedef struct {
> > UInt16 waterbody; file://max value = , 2 bytes
> > Char surveyDate[11]; // = 01/01/1994, 11
> > bytes includes null terminator
> > UInt16 area; file://max value = 999, 2 bytes
> > UInt16 method; file://max value = 999, 2 byte
> From: Brian Smith [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 2:04 PM
> To: Palm Developer Forum
> Subject: RE: record size and writing to database
>
>
> On Wed, 24 Apr 2002, Schettino, John wrote:
>
> > I believe
> > #pragma packed
>
On Wed, 24 Apr 2002, Schettino, John wrote:
> I believe
> #pragma packed
Not with GCC... in that case you need to put the following at the end of
every variable (and in the case of structures, after each member I
believe):
__attribute__ ((__packed__))
Ex:
int nVersion __attri
Thanks Brian, Dave and Howard.
Brian Smith wrote:
> On Wed, 24 Apr 2002, Jay Francis wrote:
>
> > When I use 21 as the size for the new record I get an error message
> > Application (1.0) called SysFatal Alert with the message: "DataMgr.c,
> > Line 7025,DmWrite:DmWriteCheck failed"
> >
> > When
Subject: Re: record size and writing to database
On Wed, 24 Apr 2002, Jay Francis wrote:
> When I use 21 as the size for the new record I get an error message
> Application (1.0) called SysFatal Alert with the message: "DataMgr.c,
> Line 7025,DmWrite:DmWriteCheck failed"
>
> On Wed, 24 Apr 2002, Jay Francis wrote:
>
> > When I use 21 as the size for the new record I get an error message
> > Application (1.0) called SysFatal Alert with the message: "DataMgr.c,
> > Line 7025,DmWrite:DmWriteCheck failed"
> >
> > When I use 22 everything works perfectly.
> >
> > Am
> Am I not seeing something obvious?
Try using sizeof(InfoRecordStruct)
- Original Message -
From: "Jay Francis" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 4:12 PM
Subject: record size and writi
On Wed, 24 Apr 2002, Jay Francis wrote:
> When I use 21 as the size for the new record I get an error message
> Application (1.0) called SysFatal Alert with the message: "DataMgr.c,
> Line 7025,DmWrite:DmWriteCheck failed"
>
> When I use 22 everything works perfectly.
>
> Am I not seeing some
When I use 21 as the size for the new record I get an
error message
Application (1.0) called SysFatal Alert with the
message: "DataMgr.c, Line 7025,DmWrite:DmWriteCheck
failed"
When I use 22 everything works perfectly.
Am I not seeing something obvious?
typedef struct {
UInt16 waterbody;
11 matches
Mail list logo