|
|
Rockbox mail archiveSubject: Re: Writing code for RockboxFrom: Daniel Stenberg (daniel_at_haxx.se) Date: 2003-01-28
On Tue, 28 Jan 2003 rockbox_at_diffenbach.org wrote:
> What are the sizes of the fundamental types (short, int, long, etc.)?
The "standard" 32-bit ones:
short - 16 bits
> How are floating point types handled? Is floating point emulated? Roughly,
We avoid floats like the plague. Everything float needs to be emulated and
> Are you writing under the C89 or C99 language Standard?
We only build with gcc, so we've taken the freedom to use some gcc-extensions
> but docs/API states that malloc and free are available. I'm a bit confused.
They *could* be available, but they are not. We have decided we don't need
> How much stack (automatic variable) space is available? How much can any
Default stack size is 0x400 per thread, but it differs slightly. Try the
> > Write normal C code. Don't redefine the language. No new types (structs
Nah, not deprecated, just wisely suggested to keep at a minimum.
> Can I assume that underscores are ok in variable names and in #defines?
Yes they are. In general, just follow how things are written already and
> Also, I don't want to be argumentative, and I apologize if it's a sore
If you come up with a good use of const, please use it.
> Finally, I've never written code for embedded or small memory systems, and
Yes: have fun! ;-)
-- Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/
Page was last modified "Jan 10 2012" The Rockbox Crew |