Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: file read/write code

Re: file read/write code

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Fri, 08 Nov 2002 18:55:35 +0100

Greg Haerr wrote:
>>Thanks for the heads-up. Although I prefer to use unsigned int rather
>> than long.
>
> Yes, it looks better, but it's not portable, especially for the FAT32
> implementation.
> I hate rewriting code, so I try to specify it for the long term.

That all depends on what platform you want to port to. You can't write
code that is entirely portable among different CPU families. At least
not while keeping the code readable and simple.

If you do try to write it portable, you may have even more problems if
it doesn't work, since you thought it was portable. Better write for the
platform you have now, and deal with portability when you really want to
port it. Maybe you will never port the code, then your efforts would be
for nothing.

/Linus
Received on 2002-11-08

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy