Rockbox mail archiveSubject: Re: WPS tokenizer
Re: WPS tokenizer
From: Magnus Holmgren <lear_at_algonet.se>
Date: Thu, 29 Mar 2007 21:34:54 +0200
Nicolas Pennequin wrote:
> I've updated my WPS tokenizer patch again.
> Also, I'd appreciate it a lot if people who know what makes code big and what
> helps make it smaller (and not only them !) could have a look at my code and
> tell me what could be improved.
A couple of comments/nits:
* Make rtc_tags const too.
* Use for loops where appropriate (like searching the rtc_tags or
* To avoid warnings about unused arguments, a common idiom is "(void) arg;".
* How is show_sb_on_wps set to false? By clearing the wps_data struct
* Factor out the "get filename" code for images.
* Is there any sane way to avoid the gotos in wps_parse? E.g., by
calling a function or something?
* Consider manual common subexpression elimination in some places, like
in the conditionals in draw_progress_bar. In my experience, GCC doesn't
always do it where you might expect it to, and it can increase
readability (shorter expressions).
* Shouldn't "while(wps_string " be "while(*wps_string "?
Received on 2007-03-29