summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-03-17 00:55:23 +0000
committerNils Wallménius <nils@rockbox.org>2007-03-17 00:55:23 +0000
commit685f6bb5e62bf5a769c94db9974e113304f06d31 (patch)
tree568cf2abb0d8117c3244c7f423a4cdc16d1f275f
parent661cb91e004c1ad698e2232e1743276bba32727b (diff)
downloadrockbox-685f6bb5e62bf5a769c94db9974e113304f06d31.tar.gz
rockbox-685f6bb5e62bf5a769c94db9974e113304f06d31.zip
#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
-rw-r--r--apps/filetree.c3
-rw-r--r--apps/filetree.h3
-rw-r--r--apps/tree.c15
-rw-r--r--apps/tree.h1
4 files changed, 12 insertions, 10 deletions
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)
156 { /* two directories */ 156 { /* two directories */
157 criteria = global_settings.sort_dir; 157 criteria = global_settings.sort_dir;
158 158
159#ifdef HAVE_MULTIVOLUME
159 if (e1->attr & ATTR_VOLUME || e2->attr & ATTR_VOLUME) 160 if (e1->attr & ATTR_VOLUME || e2->attr & ATTR_VOLUME)
160 { /* a volume identifier is involved */ 161 { /* a volume identifier is involved */
161 if (e1->attr & ATTR_VOLUME && e2->attr & ATTR_VOLUME) 162 if (e1->attr & ATTR_VOLUME && e2->attr & ATTR_VOLUME)
@@ -163,6 +164,8 @@ static int compare(const void* p1, const void* p2)
163 else /* only one is a volume: volume first */ 164 else /* only one is a volume: volume first */
164 return (e2->attr & ATTR_VOLUME) - (e1->attr & ATTR_VOLUME); 165 return (e2->attr & ATTR_VOLUME) - (e1->attr & ATTR_VOLUME);
165 } 166 }
167#endif
168
166 } 169 }
167 else if (!(e1->attr & ATTR_DIRECTORY) && !(e2->attr & ATTR_DIRECTORY)) 170 else if (!(e1->attr & ATTR_DIRECTORY) && !(e2->attr & ATTR_DIRECTORY))
168 { /* two files */ 171 { /* 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 @@
21#include "tree.h" 21#include "tree.h"
22 22
23int ft_load(struct tree_context* c, const char* tempdir); 23int ft_load(struct tree_context* c, const char* tempdir);
24int ft_play_filenumber(int pos, int attr);
25int ft_play_dirname(char* name);
26void ft_play_filename(char *dir, char *file);
27int ft_enter(struct tree_context* c); 24int ft_enter(struct tree_context* c);
28int ft_exit(struct tree_context* c); 25int ft_exit(struct tree_context* c);
29int ft_build_playlist(struct tree_context* c, int start_index); 26int 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;
163static bool start_wps = false; 163static bool start_wps = false;
164static int curr_context = false;/* id3db or tree*/ 164static int curr_context = false;/* id3db or tree*/
165 165
166int dirbrowse(void); 166static int dirbrowse(void);
167static int ft_play_filenumber(int pos, int attr);
168static int ft_play_dirname(char* name);
169static void ft_play_filename(char *dir, char *file);
167 170
168/* 171/*
169 * removes the extension of filename (if it doesn't start with a .) 172 * 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)
490} 493}
491 494
492/* Selects a file and update tree context properly */ 495/* Selects a file and update tree context properly */
493void set_current_file(char *path) 496static void set_current_file(char *path)
494{ 497{
495 char *name; 498 char *name;
496 int i; 499 int i;
@@ -567,7 +570,7 @@ static bool check_changed_id3mode(bool currmode)
567#endif 570#endif
568 571
569/* main loop, handles key events */ 572/* main loop, handles key events */
570int dirbrowse() 573static int dirbrowse()
571{ 574{
572 int numentries=0; 575 int numentries=0;
573 char buf[MAX_PATH]; 576 char buf[MAX_PATH];
@@ -1275,7 +1278,7 @@ void bookmark_play(char *resume_file, int index, int offset, int seed,
1275 start_wps=true; 1278 start_wps=true;
1276} 1279}
1277 1280
1278int ft_play_filenumber(int pos, int attr) 1281static int ft_play_filenumber(int pos, int attr)
1279{ 1282{
1280 /* try to find a voice ID for the extension, if known */ 1283 /* try to find a voice ID for the extension, if known */
1281 unsigned int j; 1284 unsigned int j;
@@ -1295,7 +1298,7 @@ int ft_play_filenumber(int pos, int attr)
1295 return 1; 1298 return 1;
1296} 1299}
1297 1300
1298int ft_play_dirname(char* name) 1301static int ft_play_dirname(char* name)
1299{ 1302{
1300 int fd; 1303 int fd;
1301 char dirname_mp3_filename[MAX_PATH+1]; 1304 char dirname_mp3_filename[MAX_PATH+1];
@@ -1326,7 +1329,7 @@ int ft_play_dirname(char* name)
1326 return 1; 1329 return 1;
1327} 1330}
1328 1331
1329void ft_play_filename(char *dir, char *file) 1332static void ft_play_filename(char *dir, char *file)
1330{ 1333{
1331 char name_mp3_filename[MAX_PATH+1]; 1334 char name_mp3_filename[MAX_PATH+1];
1332 1335
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*);
101void tree_init(void); 101void tree_init(void);
102void browse_root(void); 102void browse_root(void);
103void get_current_file(char* buffer, int buffer_len); 103void get_current_file(char* buffer, int buffer_len);
104void set_current_file(char *path);
105int rockbox_browse(const char *root, int dirfilter); 104int rockbox_browse(const char *root, int dirfilter);
106bool create_playlist(void); 105bool create_playlist(void);
107void resume_directory(const char *dir); 106void resume_directory(const char *dir);