From 685f6bb5e62bf5a769c94db9974e113304f06d31 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Sat, 17 Mar 2007 00:55:23 +0000 Subject: #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 --- apps/filetree.c | 3 +++ apps/filetree.h | 3 --- apps/tree.c | 15 +++++++++------ apps/tree.h | 1 - 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'apps') diff --git a/apps/filetree.c b/apps/filetree.c index b875e81d48..5660a9b75b 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -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 */ diff --git a/apps/filetree.h b/apps/filetree.h index c179959053..66fbbb579a 100644 --- a/apps/filetree.h +++ b/apps/filetree.h @@ -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); diff --git a/apps/tree.c b/apps/tree.c index a8723a44d5..ceeb64e748 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -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]; diff --git a/apps/tree.h b/apps/tree.h index 9fb8c233a0..62157112ea 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -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); -- cgit v1.2.3