This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#5623 - add a directory walker functoin to reduce code reuse
Attached to Project:
Rockbox
Opened by Jonathan Gordon (jdgordon) - Sunday, 02 July 2006, 03:30 GMT+1
Last edited by Jonathan Gordon (jdgordon) - Sunday, 20 May 2007, 10:38 GMT+1
Opened by Jonathan Gordon (jdgordon) - Sunday, 02 July 2006, 03:30 GMT+1
Last edited by Jonathan Gordon (jdgordon) - Sunday, 20 May 2007, 10:38 GMT+1
|
Detailsthis patch adds a directory walker function to reduce lots of code reuse (the same sort of function apears about a half-dozen times in playlist.c alone.. )
this patch also updates the stats plugin to use the dir walker. edit: may as well mention i did it iterativly in the ope its a bit faster on the player than recursive. |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Sunday, 20 May 2007, 10:38 GMT+1
Reason for closing: Out of Date
Additional comments about closing: very out of date and probably not worth adding anyway
Sunday, 20 May 2007, 10:38 GMT+1
Reason for closing: Out of Date
Additional comments about closing: very out of date and probably not worth adding anyway
im not 100% sure why, but get_next_directory doesnt work exactly as it used to now, but that can be figured out later.
also, i was hopeing it would drop the filesize a bit, but apparently not..
h300 size comparisson
-rw-r--r-- 1 jonno users 331980 2006-07-02 14:50 rockbox.iriver <- with patch
-rw-r--r-- 1 jonno users 331700 2006-07-02 14:49 rockbox.iriver.cvs <- without patch
recorder comparisson
-rw-r--r-- 1 jonno users 146732 2006-07-05 00:47 rockbox.ucl <- with patch
-rw-r--r-- 1 jonno users 146692 2006-07-05 00:46 rockbox.ucl.cvs <- without patch
but, imo its worth the extra 280bytes to make it easier later.
ive been told to do speed comparissions, so ill do em tomroow maybe
fixed he newly added playlist catalog to use this.
edit: you need the 2 files in the next comment also, forgot to add them and you cant add files to an existing comment
fixed again.. now its ready to go!
also changed some minor bits so its hopefully faster and smaller...
tested on my h300 and it works perfectly
I had a look at the patch and it makes the code much more understandable
which is IMHO always a good idea :-)
I also like the idea of a fileutil.c -
I assume there are a lot more currently internally used functions/code parts
which which do something for or with files and could be moved to general usage.