Rockbox mail archiveSubject: Re: Patch to reduce .ajz size by 2.5KB
From: TP Diffenbach (rockbox_at_diffenbach.org)
Quoting Björn Stenberg <bjorn_at_haxx.se>:
> TP Diffenbach wrote:
It replaces repeated code in settings.c with iteration over an array of structs.
It also makes adding a seting quite a bit easier; it took me significantly more time to add settings code to my lastest patch than writing the patch code proper.
Some evil casting can (i.e, "I know that the biggest value I'll be using will fit in a short, so I'll force the compiler to know it too...") achieve an additional savings of 0.5KB, possibly at some run-time cost as those values are re-adjusted.
I suspect, but can't yet prove, that I can save yet another 1KB or so by adding a few more arrays to remove more code.
So, interested? :)
-- Archos FM needs a Rockbox!
Page was last modified "Jan 10 2012" The Rockbox Crew