[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: kmail under Solaris and Linux
From:       Michael =?iso-8859-1?q?H=E4ckel?= <haeckel () kde ! org>
Date:       2002-02-01 7:02:38
[Download RAW message or body]

On Thursday 31 January 2002 23:00:23, Waldo Bastian wrote:
>
> Can't we add a byte-order indicator at the start of the index file? Then,
> when the byte order doesn't match we can use a slower compatibility
> function that fixes the byte order. In 99.9% of the cases this will not be
> needed but when it is needed it wil be used automagically and hassle free.
>
> I can make a patch for it if you like the idea.

This is not only required for the index file but also for the sorted and 
serial number files.

Well, if you want to do it, then do it, but it should not change the index 
file format that existing index files are still upwards and downwards 
compatible. There is at the beginning of the index file a character called 
"pad_char" in kmfolder.cpp you can use for this.
Directely after this character, there is a field, that depends on sizeof(int). 
This need also fixing then.

For the sorted file and the serial number file, you can simple increase the 
version number to change the format. The serial number file also contains 
32/64 bit ints. For the sorted file I currently don't know.

BTW: At one place we do already byte swapping, because the byte order in a 
QString changed between Qt2 and Qt3 at least on Linux. But this code is only 
called, for the few headers that are actually displayed and not when just 
reading the index file. I still don't know, if index files on Solaris are now 
compatible between KDE 2.2 and KDE 3 or not.

Regards,
Michael Häckel


_______________________________________________
kmail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic