dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: file read/write code
From: Greg Haerr (
Date: 2002-11-08

: 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.

I can agree with that. The principles I've used over the years
for declarations are twofold: 1) try to be accurate but simple,
2) use a type that helps the reader understand what's going on.
For instance, for me:

"int" means basically an integer, it doesn't matter what the storage size is.

"long", "short", "char" - the storage size is declared explicitly, it
matters what the storage size is.

For the FAT32 filesystem, we have to use 32-bit storage locations
or the algorithm as coded won't work. It can't be 16 bits or 64 bits for
the current code to run.

My $.02 worth,


Page was last modified "Jan 10 2012" The Rockbox Crew