search for: swfdec_bits_double_to_host

Displaying 2 results from an estimated 2 matches for "swfdec_bits_double_to_host".

2007 Jul 11
0
libswfdec/swfdec_bits.c
...- conv.i = GINT32_FROM_LE (conv.i); - return conv.f; } @@ -323,40 +321,30 @@ swfdec_bits_get_float (SwfdecBits * b) * use this command line: * python -c "import struct; print struct.unpack('8c', struct.pack('d', 7.949928895127363e-275))" */ -static double -swfdec_bits_double_to_host (double in) +double +swfdec_bits_get_double (SwfdecBits * b) { union { guint32 i[2]; double d; } conv; - conv.d = in; + SWFDEC_BYTES_CHECK (b, 8); + #if G_BYTE_ORDER == G_LITTLE_ENDIAN - { - int tmp = conv.i[0]; - conv.i[0] = conv.i[1]; - conv.i[1] = tmp; - } + con...
2007 Jul 11
0
Branch 'as' - 3 commits - libswfdec/swfdec_bits.c
...- conv.i = GINT32_FROM_LE (conv.i); - return conv.f; } @@ -323,40 +321,30 @@ swfdec_bits_get_float (SwfdecBits * b) * use this command line: * python -c "import struct; print struct.unpack('8c', struct.pack('d', 7.949928895127363e-275))" */ -static double -swfdec_bits_double_to_host (double in) +double +swfdec_bits_get_double (SwfdecBits * b) { union { guint32 i[2]; double d; } conv; - conv.d = in; + SWFDEC_BYTES_CHECK (b, 8); + #if G_BYTE_ORDER == G_LITTLE_ENDIAN - { - int tmp = conv.i[0]; - conv.i[0] = conv.i[1]; - conv.i[1] = tmp; - } + con...