summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-05-24 20:56:19 +0000
committerNils Wallménius <nils@rockbox.org>2008-05-24 20:56:19 +0000
commit11a667b6ca68e9e9e1025319cd5bdffd02e3a841 (patch)
treea70587884b93055b54bdc9239c46d6b6e5aa32b0 /apps
parent1659a1a0317e06ff1f4fd22c323ecb33a041a470 (diff)
downloadrockbox-11a667b6ca68e9e9e1025319cd5bdffd02e3a841.tar.gz
rockbox-11a667b6ca68e9e9e1025319cd5bdffd02e3a841.tar.bz2
rockbox-11a667b6ca68e9e9e1025319cd5bdffd02e3a841.zip
FS#9033 by Alexander Levin, also a couple of minor typo fixes by me and making the inbuilt_filetypes array static
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17625 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/filetypes.c16
-rw-r--r--apps/filetypes.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c
index 5a7ed115e6..4710d61cc1 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -48,7 +48,7 @@
#endif
/* a table for the know file types */
-const struct filetype inbuilt_filetypes[] = {
+static const struct filetype inbuilt_filetypes[] = {
{ "mp3", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA },
{ "mp2", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA },
{ "mpa", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA },
@@ -130,7 +130,7 @@ static bool custom_icons_loaded = false;
static int custom_colors[MAX_FILETYPES+1];
#endif
static int filetype_count = 0;
-static unsigned char heighest_attr = 0;
+static unsigned char highest_attr = 0;
static char *filetypes_strdup(char* string)
{
@@ -277,8 +277,8 @@ static void read_builtin_types(void)
filetypes[filetype_count].extension = inbuilt_filetypes[i].extension;
filetypes[filetype_count].plugin = NULL;
filetypes[filetype_count].attr = inbuilt_filetypes[i].tree_attr>>8;
- if (filetypes[filetype_count].attr > heighest_attr)
- heighest_attr = filetypes[filetype_count].attr;
+ if (filetypes[filetype_count].attr > highest_attr)
+ highest_attr = filetypes[filetype_count].attr;
filetypes[filetype_count].icon = inbuilt_filetypes[i].icon;
filetype_count++;
}
@@ -321,9 +321,9 @@ static void read_config(char* config_file)
/* ok, store this plugin/extension, check icon after */
filetypes[filetype_count].extension = filetypes_strdup(extension);
filetypes[filetype_count].plugin = filetypes_strdup(plugin);
- filetypes[filetype_count].attr = heighest_attr +1;
+ filetypes[filetype_count].attr = highest_attr +1;
filetypes[filetype_count].icon = Icon_Questionmark;
- heighest_attr++;
+ highest_attr++;
/* get the icon */
s = e+1;
if (*s == '*')
@@ -419,7 +419,7 @@ bool filetype_supported(int attr)
/**** Open With Screen ****/
struct cb_data {
int *items;
- char *current_file;
+ const char *current_file;
};
static enum themable_icons openwith_get_icon(int selected_item, void * data)
@@ -463,7 +463,7 @@ int filetype_list_viewers(const char* current_file)
int i, count = 0;
int items[MAX_FILETYPES];
struct simplelist_info info;
- struct cb_data data = { items, (char*)current_file };
+ struct cb_data data = { items, current_file };
for (i=0; i<filetype_count && count < MAX_FILETYPES; i++)
{
if (filetypes[i].plugin)
diff --git a/apps/filetypes.h b/apps/filetypes.h
index 66553e5b24..6cf49d3a62 100644
--- a/apps/filetypes.h
+++ b/apps/filetypes.h
@@ -5,7 +5,7 @@
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
- * $Id:
+ * $Id$
*
* Copyright (C) 2002 Henrik Backe
*