I want to generate a .pdb file
(using pdbc compiler
http://www.obermuhlner.com/public/Projects/Palm/PDBC/index.html )
with the records as follow:
record
begin
includebin "abc.txt"
end;
The file structure of the binary text file is like this:
(minX)(minY)(noOfCoordinate)(x1)(y1)(x2)(y2)......(noOfCoordinate)(x1)(y1)(x
2)(y2)......(0)
where minX, minY are double values (8bytes)
noOfCoordinate, x, y are short values(2bytes)
0 is used to indicated the end
noOfCoordinate is used to define how many x, y pairs follow
eg, if noOfCoordinate = 3 then there are 3 groups of x, y values,
i.e. (noOfCoordinate)(x1)(y1)(x2)(y2)(x3)(y3)
the problem is in every record, the number of the group
[(noOfCoordinate)(x1)(y1)(x2)(y2)......] is different, can I make a typedef
struct as follow:
typedef struct {
Int64 minX;
Int64 minY;
Int16 noOfCoordinate;
Int16 arrayX[maxNo];
Int16 arrayY[maxNo];
} Path;
or some structure similar so I can easily get the database values
(especailly the noOfCoordinate, arrayX and arrayY) ?
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/