summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-08-01 23:34:44 +0000
committerJens Arnold <amiconn@rockbox.org>2004-08-01 23:34:44 +0000
commit839067b7b306e2da5142c3f31747205df8f9e4f5 (patch)
tree819e416c7a30d48de0a2160a2989d7f495d921cc
parent1413f0cc953d92d91411d2d871fc4d44a294e82b (diff)
downloadrockbox-839067b7b306e2da5142c3f31747205df8f9e4f5.zip
rockbox-839067b7b306e2da5142c3f31747205df8f9e4f5.tar.gz
rockbox-839067b7b306e2da5142c3f31747205df8f9e4f5.tar.bz2
rockbox-839067b7b306e2da5142c3f31747205df8f9e4f5.tar.xz
More const policeing step 2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4980 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/filetypes.c2
-rw-r--r--apps/recorder/peakmeter.c4
-rw-r--r--apps/recorder/recording.c6
-rw-r--r--apps/sound_menu.c2
-rw-r--r--apps/talk.c2
-rw-r--r--apps/talk.h2
-rw-r--r--apps/tree.c4
-rw-r--r--apps/tree.h2
-rw-r--r--apps/wps.c2
9 files changed, 13 insertions, 13 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c
index cab9618..d7151ca 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -84,7 +84,7 @@ static void scan_plugins(void);
void filetype_init(void)
{
int cnt,i,ix;
- struct filetype* ftypes;
+ const struct filetype* ftypes;
memset(exttypes,0,sizeof(exttypes));
memset(filetypes,0,sizeof(filetypes));
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index 33d1e25..b069c15 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -103,14 +103,14 @@ static unsigned int ticks_per_redraw[TICKS_PER_DRAW_SIZE];
#endif
/* time out values for max */
-static long max_time_out[] = {
+static const long max_time_out[] = {
0 * HZ, HZ / 5, 30, HZ / 2, HZ, 2 * HZ,
3 * HZ, 4 * HZ, 5 * HZ, 6 * HZ, 7 * HZ, 8 * HZ,
9 * HZ, 10 * HZ, 15 * HZ, 20 * HZ, 30 * HZ, 60 * HZ
};
/* time out values for clip */
-static long clip_time_out[] = {
+static const long clip_time_out[] = {
0 * HZ, 1 * HZ, 2 * HZ, 3 * HZ, 4 * HZ, 5 * HZ,
6 * HZ, 7 * HZ, 8 * HZ, 9 * HZ, 10 * HZ, 15 * HZ,
20 * HZ, 25 * HZ, 30 * HZ, 45 * HZ, 60 * HZ, 90 * HZ,
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 242351a..20b5fa0 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -56,7 +56,7 @@ bool f3_rec_screen(void);
#define SOURCE_LINE 1
#define SOURCE_SPDIF 2
-char *freq_str[6] =
+const char* const freq_str[6] =
{
"44.1kHz",
"48kHz",
@@ -79,7 +79,7 @@ static void set_gain(void)
}
}
-static char *fmtstr[] =
+static const char* const fmtstr[] =
{
"", /* no decimals */
"%d.%d %s ", /* 1 decimal */
@@ -632,7 +632,7 @@ bool f2_rec_screen(void)
lcd_getstringsize("A",&w,&h);
while (!exit) {
- char* ptr=NULL;
+ const char* ptr=NULL;
lcd_clear_display();
diff --git a/apps/sound_menu.c b/apps/sound_menu.c
index 6f62ce2..bbf1c6c 100644
--- a/apps/sound_menu.c
+++ b/apps/sound_menu.c
@@ -35,7 +35,7 @@
#include "talk.h"
#include "misc.h"
-static char *fmt[] =
+static const char* const fmt[] =
{
"", /* no decimals */
"%d.%d %s ", /* 1 decimal */
diff --git a/apps/talk.c b/apps/talk.c
index 51e8ae7..1b3dda3 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -38,7 +38,7 @@ extern void bitswap(unsigned char *data, int length); /* no header for this */
#define QUEUE_SIZE 64 /* must be a power of two */
#define QUEUE_MASK (QUEUE_SIZE-1)
-const char* dir_thumbnail_name = "_dirname.talk";
+const char* const dir_thumbnail_name = "_dirname.talk";
/***************** Functional Macros *****************/
diff --git a/apps/talk.h b/apps/talk.h
index 2476c8e..de93b16 100644
--- a/apps/talk.h
+++ b/apps/talk.h
@@ -55,7 +55,7 @@ enum {
#define STR(id) ID2P(id), id
/* publish this string, so it's stored only once (better than #define) */
-extern const char* dir_thumbnail_name;
+extern const char* const dir_thumbnail_name;
void talk_init(void);
diff --git a/apps/tree.c b/apps/tree.c
index 9ce5a9c..017e987 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -70,7 +70,7 @@
extern bool language_changed;
/* a table for the know file types */
-struct filetype filetypes[] = {
+const struct filetype filetypes[] = {
{ ".mp3", TREE_ATTR_MPA, File, VOICE_EXT_MPA },
{ ".mp2", TREE_ATTR_MPA, File, VOICE_EXT_MPA },
{ ".mpa", TREE_ATTR_MPA, File, VOICE_EXT_MPA },
@@ -132,7 +132,7 @@ void browse_root(void)
#endif
}
-void tree_get_filetypes(struct filetype** types, int* count)
+void tree_get_filetypes(const struct filetype** types, int* count)
{
*types = filetypes;
*count = sizeof(filetypes) / sizeof(*filetypes);
diff --git a/apps/tree.h b/apps/tree.h
index 01f3669..0889b72 100644
--- a/apps/tree.h
+++ b/apps/tree.h
@@ -48,7 +48,7 @@ struct filetype {
#define TREE_ATTR_MOD 0x0900 /* firmware file */
#define TREE_ATTR_MASK 0xFFC0 /* which bits tree.c uses (above) */
-void tree_get_filetypes(struct filetype**, int*);
+void tree_get_filetypes(const struct filetype**, int*);
void tree_init(void);
void browse_root(void);
void set_current_file(char *path);
diff --git a/apps/wps.c b/apps/wps.c
index 86ce4b0..45aa823 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -309,7 +309,7 @@ bool browse_id3(void)
static bool ffwd_rew(int button)
{
- static int ff_rew_steps[] = {
+ static const int ff_rew_steps[] = {
1000, 2000, 3000, 4000,
5000, 6000, 8000, 10000,
15000, 20000, 25000, 30000,