summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-08-18 01:09:31 +0000
committerJens Arnold <amiconn@rockbox.org>2004-08-18 01:09:31 +0000
commit8fb336148fb34474c67fbc6e0354daa4512a22fb (patch)
tree5910d0a54bf8424b424939a263abef0f570591f7 /apps/tree.c
parent6d0da414bfea35b4370ad820d28d4565521d7b12 (diff)
downloadrockbox-8fb336148fb34474c67fbc6e0354daa4512a22fb.tar.gz
rockbox-8fb336148fb34474c67fbc6e0354daa4512a22fb.zip
Const policed pointer arguments to functions, part 3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4999 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 017e9877f1..c9249caa7d 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -118,7 +118,7 @@ static int boot_cluster;
118static bool boot_changed = false; 118static bool boot_changed = false;
119 119
120static bool start_wps = false; 120static bool start_wps = false;
121static bool dirbrowse(char *root, int *dirfilter); 121static bool dirbrowse(const char *root, const int *dirfilter);
122 122
123void browse_root(void) 123void browse_root(void)
124{ 124{
@@ -293,7 +293,7 @@ static int compare(const void* p1, const void* p2)
293 return 0; /* never reached */ 293 return 0; /* never reached */
294} 294}
295 295
296static void showfileline(int line, int direntry, bool scroll, int *dirfilter) 296static void showfileline(int line, int direntry, bool scroll, const int *dirfilter)
297{ 297{
298 char* name = dircache[direntry].name; 298 char* name = dircache[direntry].name;
299 int xpos = LINE_X; 299 int xpos = LINE_X;
@@ -331,7 +331,7 @@ static void showfileline(int line, int direntry, bool scroll, int *dirfilter)
331} 331}
332 332
333/* load sorted directory into dircache. returns NULL on failure. */ 333/* load sorted directory into dircache. returns NULL on failure. */
334struct entry* load_and_sort_directory(char *dirname, int *dirfilter, 334struct entry* load_and_sort_directory(const char *dirname, const int *dirfilter,
335 int *num_files, bool *buffer_full) 335 int *num_files, bool *buffer_full)
336{ 336{
337 int i; 337 int i;
@@ -453,7 +453,7 @@ static int recalc_screen_height(void)
453} 453}
454#endif 454#endif
455 455
456static int showdir(char *path, int start, int *dirfilter) 456static int showdir(const char *path, int start, const int *dirfilter)
457{ 457{
458 int i; 458 int i;
459 int tree_max_on_screen; 459 int tree_max_on_screen;
@@ -652,7 +652,7 @@ static bool ask_resume(bool ask_once)
652} 652}
653 653
654/* load tracks from specified directory to resume play */ 654/* load tracks from specified directory to resume play */
655void resume_directory(char *dir) 655void resume_directory(const char *dir)
656{ 656{
657 bool buffer_full; 657 bool buffer_full;
658 658
@@ -753,7 +753,8 @@ void set_current_file(char *path)
753} 753}
754 754
755#ifdef BUTTON_ON 755#ifdef BUTTON_ON
756static bool handle_on(int *ds, int *dc, int numentries, int tree_max_on_screen, int *dirfilter) 756static bool handle_on(int *ds, int *dc, int numentries, int tree_max_on_screen,
757 const int *dirfilter)
757{ 758{
758 bool exit = false; 759 bool exit = false;
759 bool used = false; 760 bool used = false;
@@ -878,7 +879,7 @@ static bool handle_on(int *ds, int *dc, int numentries, int tree_max_on_screen,
878} 879}
879#endif 880#endif
880 881
881static bool dirbrowse(char *root, int *dirfilter) 882static bool dirbrowse(const char *root, const int *dirfilter)
882{ 883{
883 int numentries=0; 884 int numentries=0;
884 char buf[MAX_PATH]; 885 char buf[MAX_PATH];
@@ -1643,7 +1644,7 @@ bool create_playlist(void)
1643 return true; 1644 return true;
1644} 1645}
1645 1646
1646bool rockbox_browse(char *root, int dirfilter) 1647bool rockbox_browse(const char *root, int dirfilter)
1647{ 1648{
1648 bool rc; 1649 bool rc;
1649 int dircursor_save = dircursor; 1650 int dircursor_save = dircursor;