#ifdef code that only makes sense for multivolume targets, make private functions 'static'

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12813 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2007-03-17 00:55:23 +00:00
parent 661cb91e00
commit 685f6bb5e6
4 changed files with 12 additions and 10 deletions

View File

@ -156,6 +156,7 @@ static int compare(const void* p1, const void* p2)
{ /* two directories */
criteria = global_settings.sort_dir;
#ifdef HAVE_MULTIVOLUME
if (e1->attr & ATTR_VOLUME || e2->attr & ATTR_VOLUME)
{ /* a volume identifier is involved */
if (e1->attr & ATTR_VOLUME && e2->attr & ATTR_VOLUME)
@ -163,6 +164,8 @@ static int compare(const void* p1, const void* p2)
else /* only one is a volume: volume first */
return (e2->attr & ATTR_VOLUME) - (e1->attr & ATTR_VOLUME);
}
#endif
}
else if (!(e1->attr & ATTR_DIRECTORY) && !(e2->attr & ATTR_DIRECTORY))
{ /* two files */

View File

@ -21,9 +21,6 @@
#include "tree.h"
int ft_load(struct tree_context* c, const char* tempdir);
int ft_play_filenumber(int pos, int attr);
int ft_play_dirname(char* name);
void ft_play_filename(char *dir, char *file);
int ft_enter(struct tree_context* c);
int ft_exit(struct tree_context* c);
int ft_build_playlist(struct tree_context* c, int start_index);

View File

@ -163,7 +163,10 @@ static bool reload_dir = false;
static bool start_wps = false;
static int curr_context = false;/* id3db or tree*/
int dirbrowse(void);
static int dirbrowse(void);
static int ft_play_filenumber(int pos, int attr);
static int ft_play_dirname(char* name);
static void ft_play_filename(char *dir, char *file);
/*
* removes the extension of filename (if it doesn't start with a .)
@ -490,7 +493,7 @@ void get_current_file(char* buffer, int buffer_len)
}
/* Selects a file and update tree context properly */
void set_current_file(char *path)
static void set_current_file(char *path)
{
char *name;
int i;
@ -567,7 +570,7 @@ static bool check_changed_id3mode(bool currmode)
#endif
/* main loop, handles key events */
int dirbrowse()
static int dirbrowse()
{
int numentries=0;
char buf[MAX_PATH];
@ -1275,7 +1278,7 @@ void bookmark_play(char *resume_file, int index, int offset, int seed,
start_wps=true;
}
int ft_play_filenumber(int pos, int attr)
static int ft_play_filenumber(int pos, int attr)
{
/* try to find a voice ID for the extension, if known */
unsigned int j;
@ -1295,7 +1298,7 @@ int ft_play_filenumber(int pos, int attr)
return 1;
}
int ft_play_dirname(char* name)
static int ft_play_dirname(char* name)
{
int fd;
char dirname_mp3_filename[MAX_PATH+1];
@ -1326,7 +1329,7 @@ int ft_play_dirname(char* name)
return 1;
}
void ft_play_filename(char *dir, char *file)
static void ft_play_filename(char *dir, char *file)
{
char name_mp3_filename[MAX_PATH+1];

View File

@ -101,7 +101,6 @@ void tree_get_filetypes(const struct filetype**, int*);
void tree_init(void);
void browse_root(void);
void get_current_file(char* buffer, int buffer_len);
void set_current_file(char *path);
int rockbox_browse(const char *root, int dirfilter);
bool create_playlist(void);
void resume_directory(const char *dir);