christy,
typedef struct{
char fields;
}DBPackedRecord;
/* fid should be an int but I don't know how to unpack
an int */
typedef struct{
Char *fid;
Char *fname;
}DBRecordType;
static void UnpackRecord(DBPackedRecord *packed,
DBRecordType *record){
char *p;
p = &packed->fields;
record->fid=p;
p +=StrLen(p) + 1;
record->fname=p;
}
do bring this to work:record->fid = p[0];
p++;
you extract one char, which is 1 byte, skip it and get the string just after it.
To extract an int you can write:
record->fid = (p[0] << 8) + p[1]; // big endian
p += 2;
Henk
--
-------------------------------------------------------------------------
[EMAIL PROTECTED] www.metaviewsoft.de
<A HREF="http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946">
<IMG SRC="http://user.cs.tu-berlin.de/~jonash/werbung_palmos.jpg"></A>
-------------------------------------------------------------------------
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
