Rockbox Technical Forums

Support and General Use => Plugins/Viewers => Topic started by: mlind on January 06, 2007, 06:27:14 AM

Title: Help me add "one line" of code [solved]
Post by: mlind on January 06, 2007, 06:27:14 AM
I would like to try to contribute to the RockBox code, and I do understand a bit of coding.
However, I still haven't got a working compiling environment (on my Mac).

Right now I think that this thing I want to try is so simple that for somebody who is compiling regularly it would just take 2 minutes to do, while it would take me the entire weekend - if I would get any result at all.

Would somebody please add this for me and make a build for me to try?

Please excuse me, and tell me if there's more to it than I think....

Here goes:
In (/apps/plugins/)"disktidy.c" find these lines (supposedly line 274 and 275) in
Code: [Select]
/* dir not deleted so clean it */
status = tidy_clean(fullname, removed, system);

This is the recursive call to the same function that you're already in.
To avoid that the plugin tries to open more directories than allowed, I want to add an "if"-statement to line 275.
Like this:
Code: [Select]
if (opendirs() < MAX_OPEN_DIRS)
 Â    {
 Â          status = tidy_clean(fullname, removed, system);
 Â     }

EDIT: This did indeed not work...
Title: Re: Help me add "one line" of code
Post by: d47 on January 06, 2007, 01:27:34 PM
well it be happy to compile for you, quite easy, but one essential element is missing from your post, what player do you want it to compile for?
Title: Re: Help me add "one line" of code [solved]
Post by: mlind on January 06, 2007, 02:03:42 PM
Thanks.
But...
First I asked my question on IRC.
Got "please try to do it yourself, kindly".
Spent half of the day getting compiling to actually work.
Spent the rest of the day trying my idea, and understanding that it wouldn't work the way I thought.
Trying a few lines more (than just "one").

So now at last I THINK I got it!

Just got to learn to make a patch and make everything look neat...