This image is the top of the content box. Unfortunately, there is no information-based reason for this div to be here. It's just here for design reasons. Sorry.
Go Back   MisticRiver :: For iriver Enthusiasts > All things Rockbox > ROCKbox Forums > ROCKbox for H3xx Series
Home Forums Register FAQ Search Today's Posts Mark Forums Read


Welcome to the misticriver forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old December 21st, 2005, 11:02 AM
Ego Ego is offline
Amorphous Mutating Mistic
 
Join Date: Dec 2004
Posts: 574
hm.. little filetree editing help

using the 'supported' display option, i want to filter out .rockbox and such, but not folders beginning with '...' (like my Awesome Machine album, '...It's Ugly or Nothing')

i know enough to see that the relevant part of the code is here, in filetree.c:

Code:
/* skip directories . and .. */
        if ((entry->attribute & ATTR_DIRECTORY) &&
            (((len == 1) && (!strncmp((char *)entry->d_name, ".", 1))) ||
             ((len == 2) && (!strncmp((char *)entry->d_name, "..", 2))))) {
            i--;
            continue;
        }

        /* Skip FAT volume ID */
        if (entry->attribute & ATTR_VOLUME_ID) {
            i--;
            continue;
        }

        /* filter out dotfiles and hidden files */
        if (*c->dirfilter != SHOW_ALL &&
            ((entry->d_name[0]=='.') ||
            (entry->attribute & ATTR_HIDDEN))) {
            i--;
            continue;
but i don't know what to add to make that happen (and really, i'm only like 80% that's the right place). any help from someone with more know-how?

-EGO
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old December 21st, 2005, 11:31 AM
Newbie Floating Down The Mistic River
 
Join Date: Dec 2004
Posts: 50
Quote:
Originally Posted by Ego
using the 'supported' display option, i want to filter out .rockbox and such, but not folders beginning with '...' (like my Awesome Machine album, '...It's Ugly or Nothing')

i know enough to see that the relevant part of the code is here, in filetree.c:

Code:
/* skip directories . and .. */
        if ((entry->attribute & ATTR_DIRECTORY) &&
            (((len == 1) && (!strncmp((char *)entry->d_name, ".", 1))) ||
             ((len == 2) && (!strncmp((char *)entry->d_name, "..", 2))))) {
            i--;
            continue;
        }

        /* Skip FAT volume ID */
        if (entry->attribute & ATTR_VOLUME_ID) {
            i--;
            continue;
        }

        /* filter out dotfiles and hidden files */
        if (*c->dirfilter != SHOW_ALL &&
            ((entry->d_name[0]=='.') ||
            (entry->attribute & ATTR_HIDDEN))) {
            i--;
            continue;
but i don't know what to add to make that happen (and really, i'm only like 80% that's the right place). any help from someone with more know-how?

-EGO

That looks like the right place... I believe you want to take the code that says:

Code:
       if (*c->dirfilter != SHOW_ALL &&
            ((entry->d_name[0]=='.') ||
            (entry->attribute & ATTR_HIDDEN))) {
            i--;
            continue;
and change it to:

Code:
       if (*c->dirfilter != SHOW_ALL &&
            (((entry->d_name[0]=='.') && (entry->d_name[1]!='.')) ||
            (entry->attribute & ATTR_HIDDEN))) {
            i--;
            continue;
That should filter if the directory starts with ., but not if it starts with ..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old December 21st, 2005, 12:48 PM
Ego Ego is offline
Amorphous Mutating Mistic
 
Join Date: Dec 2004
Posts: 574
sweet, that worked! thanks

-EGO
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old December 21st, 2005, 03:04 PM
Newbie Floating Down The Mistic River
 
Join Date: Dec 2004
Posts: 50
you're welcome
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old December 21st, 2005, 05:12 PM
Amorphous Mutating Mistic
 
Join Date: Aug 2004
Location: University of Manchester
Posts: 558
Send a message via MSN to Philip_0729
I wish I knew what on earth that code meant but you seem to have fixed it are you going to submit it to the patch tracker ???
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old December 21st, 2005, 05:47 PM
Newbie Floating Down The Mistic River
 
Join Date: Dec 2004
Posts: 50
Quote:
Originally Posted by Philip_0729
I wish I knew what on earth that code meant but you seem to have fixed it are you going to submit it to the patch tracker ???
d_name is the directory name, and that bit of code said if d_name[0] (the 1st character) was a ., then hide it. All I did is tell it to see if the second character was a . as well, and if it wasn't, then hide it, otherwise show it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old December 21st, 2005, 07:59 PM
Ego Ego is offline
Amorphous Mutating Mistic
 
Join Date: Dec 2004
Posts: 574
i don't really know how to submit a patch... i know just enough code to be able to guess at what it does, with help from the comments, but i've done the LCD color thing, this one, and changed the functions of the Navi with the Record button on the WPS. it's nothin too big, and they all have instructions for them here or there on the forum (and this one i can't really take credit for at all, my idea but i didn't write the code)

-EGO
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 06:39 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
This image is the bottom of the content box. Unfortunately, there is no information-based reason for this div to be here. It's just here for design reasons. Sorry.