[Top][All Lists]

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

Re: [Enigma-devel] Portability issues with score files

From: Ronald Lamprecht
Subject: Re: [Enigma-devel] Portability issues with score files
Date: Sun, 03 Dec 2006 19:01:05 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)


Aaron Schrab wrote:

sounds to me like some 32bit vs. 64bit issues with the score files.
There might also be some endianess issues, then.
Some users might want to share their home directory across different
archtiectures; they should be able to share their score files, too.

I analysed the enigma.score and state.xml - nearly perfect, but the userid is stored as a hex dumped string "1AE15C2FA3ABFF84" and I did read this string word by word (4 chars at a time) via

unsigned i1, i2, i3, i4;
sscanf("1AE15C2FA3ABFF84","%4lX%4lX%4lX%4lX", &i1, &i2, &i3, &i4);

I know I have been warned not to use sscanf, never, never in live, but I did it twice.

The size specification element "l" (L) should mean an integer or unsigned due to my docs. But it must be wrong in case of AMD64. Does anybody knows how scanf is implemented for 64 bit architectures?

Meanwhile I will switch these two cases to a byte oriented scan.

@Aaron: I will send you a patch for testing lateron. I would like to know the results before adding the patch to the development trunk.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]