Re: Utilty for parsing raw data into C structures
From: Måns Rullgård (mru_at_mru.ath.cx)
Date: 09/30/04
- Next message: Pat Ford: "Re: Utilty for parsing raw data into C structures"
- Previous message: QNils_O=2E_Sel=E5sdal=22?=: "Re: Utilty for parsing raw data into C structures"
- In reply to: QNils_O=2E_Sel=E5sdal=22?=: "Re: Utilty for parsing raw data into C structures"
- Next in thread: Karthik K R: "Re: Utilty for parsing raw data into C structures"
- Reply: Karthik K R: "Re: Utilty for parsing raw data into C structures"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Sep 2004 10:41:51 +0200
"Nils O. Selåsdal" <NOS@Utel.no> writes:
> Pat Ford wrote:
>> "Karthik K R" <shukart1@yahoo.com> wrote in message
>> news:44bd5fac.0409290606.69a9d264@posting.google.com...
>>
>>>Hi,
>>>
>>>I need some help on parsing data into C structures and then printing
>>>them.
I wrote such a program once. What made it difficult was that it had
to be done in Java (choice of my employer, not mine).
> Depending what's the structure of the data is in
> }RefHeaderType __attribute__((__packed__));
> might be needed when mapping data directly to C structures.
If the file was created by dumping C structs, it should be sufficient
to use the same definition when reading it, if the code is compiled
for a machine with the same endianness and alignment constraints as
whatever generated the file. If the machines are different, things
start getting more difficult.
-- Måns Rullgård mru@mru.ath.cx
- Next message: Pat Ford: "Re: Utilty for parsing raw data into C structures"
- Previous message: QNils_O=2E_Sel=E5sdal=22?=: "Re: Utilty for parsing raw data into C structures"
- In reply to: QNils_O=2E_Sel=E5sdal=22?=: "Re: Utilty for parsing raw data into C structures"
- Next in thread: Karthik K R: "Re: Utilty for parsing raw data into C structures"
- Reply: Karthik K R: "Re: Utilty for parsing raw data into C structures"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|