Re: Wine and endianness

2011-08-01 Thread GOUJON Alexandre
On 08/01/2011 09:09 AM, David Laight wrote: If you have 'unsigned char bloc[]' and want to read a 32 bit LE value you can do: value = bloc[20 + 0]; value |= bloc[20 + 1]<< 8; value |= bloc[20 + 2]<< 16; value |= bloc[20 + 3]<< 24; *offs = value; And that is correct on

Re: Wine and endianness

2011-08-01 Thread David Laight
On Mon, Aug 01, 2011 at 08:31:50AM +0200, GOUJON Alexandre wrote: > > Sorry to disturb your conversation but the subject is worth discussing. > > I'm currently trying to add UDF support on wine based on Steven Wallace > work. > Quoting the specification : "On the media the UDF structures are sto

Wine and endianness

2011-07-31 Thread GOUJON Alexandre
On 07/31/2011 08:12 PM, Stefan Dösinger wrote: With the bitfields I'm not sure about stuff like endianess. My gut feeling would be to use bitmasks and shifts to separate a DWORD instead, but bitfields certainly look nicer. Beyond that endianess is a somewhat academic consideration with an API th