Re: Problem with Excel import on ARM

+++ Morten Welinder [04-05-05 12:40 -0400]:

Gnumeric runs fine of Sparc so big-endian machines are handled.  That
is not to say that there might not be a screw-up somewhere.

I cannot actually load your sheet, so I cannot see what is in it.
(HTTP request sent, awaiting response... 403 Forbidden)

Sorry - Permissions fixed now.

It would be useful to see what kind of byte layout is being used
for doubles.  Please do something like this:

#include <math.h>
#include <stdio.h>
int main ()
  double x = M_PI;
  const unsigned char *p = (const unsigned char *)&x;
  int i;
  for (i = 0; i < sizeof (x); i++)
    printf ("%02x ", *p++);
  printf ("\n");
  return 0;

I get...

sparc> ./a.out 
40 09 21 fb 54 44 2d 18 

x86> ./a.out
18 2d 44 54 fb 21 09 40 

thanx for that - makes my life very easy :-)

Please let me know what you get...  If you don't get anything like the
above, perhaps you know of a reference that tells the layout of doubles
on ARM?

  arm> ./a.out
  fb 21 09 40 18 2d 44 54
(using gcc 3.3.3 (native))

Looks like little-endian within the word but the words are stored
big-endian. That may be what IEEE_DOUBLE_MIXED_ENDIAN refers to in the patch
referred-to below.

I'm still trying to find a definitive reference for the format.
The best I've found so far is a clue here suggests that it is either ieee754
or ieee854:



Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel +44 (0) 1223 811679
work:     play:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]