forked from len0rd/rockbox
More const policeing step 1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4978 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
27a4b60f1a
commit
abe77a1a2a
8 changed files with 18 additions and 19 deletions
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
/*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */
|
||||
|
||||
char appsversion[]=APPSVERSION;
|
||||
const char appsversion[]=APPSVERSION;
|
||||
|
||||
void init(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ int main(int argc, char **argv)
|
|||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
|
||||
static unsigned char bmpheader[] =
|
||||
static const unsigned char bmpheader[] =
|
||||
{
|
||||
0x42, 0x4d, 0x3e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00,
|
||||
0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x40, 0x00,
|
||||
|
|
@ -126,7 +126,7 @@ static unsigned char bmpheader[] =
|
|||
|
||||
static unsigned char buf[112*8];
|
||||
static unsigned char buf2[112*8];
|
||||
static char dummy[2] = {0, 0};
|
||||
static const char dummy[2] = {0, 0};
|
||||
|
||||
void screen_dump(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ struct plugin_api {
|
|||
|
||||
/* lcd */
|
||||
void (*lcd_clear_display)(void);
|
||||
void (*lcd_puts)(int x, int y, unsigned char *string);
|
||||
void (*lcd_puts)(int x, int y, const unsigned char *string);
|
||||
void (*lcd_puts_scroll)(int x, int y, unsigned char* string);
|
||||
void (*lcd_stop_scroll)(void);
|
||||
void (*lcd_set_contrast)(int x);
|
||||
|
|
@ -125,7 +125,7 @@ struct plugin_api {
|
|||
void (*lcd_icon)(int icon, bool enable);
|
||||
#else
|
||||
void (*lcd_putsxy)(int x, int y, const unsigned char *string);
|
||||
void (*lcd_puts_style)(int x, int y, unsigned char *str, int style);
|
||||
void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style);
|
||||
void (*lcd_bitmap)(const unsigned char *src, int x, int y,
|
||||
int nx, int ny, bool clear);
|
||||
void (*lcd_drawline)(int x1, int y1, int x2, int y2);
|
||||
|
|
@ -138,7 +138,7 @@ struct plugin_api {
|
|||
void (*lcd_fillrect)(int x, int y, int nx, int ny);
|
||||
void (*lcd_drawrect)(int x, int y, int nx, int ny);
|
||||
void (*lcd_invertrect)(int x, int y, int nx, int ny);
|
||||
int (*lcd_getstringsize)(unsigned char *str, int *w, int *h);
|
||||
int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h);
|
||||
void (*lcd_update)(void);
|
||||
void (*lcd_update_rect)(int x, int y, int width, int height);
|
||||
void (*scrollbar)(int x, int y, int width, int height, int items,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
void dac_line_in(bool enable);
|
||||
#endif
|
||||
struct user_settings global_settings;
|
||||
char rec_base_directory[] = REC_BASE_DIR;
|
||||
const char rec_base_directory[] = REC_BASE_DIR;
|
||||
|
||||
|
||||
#define CONFIG_BLOCK_VERSION 16
|
||||
|
|
@ -1513,7 +1513,7 @@ bool set_option(char* string, void* variable, enum optiontype type,
|
|||
|
||||
#ifdef HAVE_MAS3587F
|
||||
/* This array holds the record timer interval lengths, in seconds */
|
||||
static unsigned long rec_timer_seconds[] =
|
||||
static const unsigned long rec_timer_seconds[] =
|
||||
{
|
||||
24*60*60, /* OFF really means 24 hours, to avoid >2Gbyte files */
|
||||
5*60, /* 00:05 */
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
#define VIRT_SIZE 0xFFFF /* more than enough for our string ID range */
|
||||
#ifdef SIMULATOR
|
||||
/* a space which is defined in stubs.c */
|
||||
extern unsigned char vp_dummy[VIRT_SIZE];
|
||||
extern unsigned char vp_dummy[VIRT_SIZE];
|
||||
#define VIRT_PTR vp_dummy
|
||||
#else
|
||||
/* a location where we won't store strings, 0 is the fastest */
|
||||
|
|
@ -250,7 +250,7 @@ struct user_settings
|
|||
enum optiontype { INT, BOOL };
|
||||
|
||||
struct opt_items {
|
||||
unsigned char* string;
|
||||
unsigned const char* string;
|
||||
int voice_id;
|
||||
};
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ extern struct user_settings global_settings;
|
|||
extern long lasttime;
|
||||
|
||||
/* Recording base directory */
|
||||
extern char rec_base_directory[];
|
||||
extern const char rec_base_directory[];
|
||||
|
||||
/* system defines */
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@
|
|||
#ifndef _VERSION_H_
|
||||
#define _VERSION_H_
|
||||
|
||||
extern char appsversion[];
|
||||
extern const char appsversion[];
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ void lcd_setfont(int newfont)
|
|||
curfont = newfont;
|
||||
}
|
||||
|
||||
int lcd_getstringsize(unsigned char *str, int *w, int *h)
|
||||
int lcd_getstringsize(const unsigned char *str, int *w, int *h)
|
||||
{
|
||||
struct font* pf = font_get(curfont);
|
||||
int ch;
|
||||
|
|
@ -328,12 +328,12 @@ int lcd_getstringsize(unsigned char *str, int *w, int *h)
|
|||
}
|
||||
|
||||
/* put a string at a given char position */
|
||||
void lcd_puts(int x, int y, unsigned char *str)
|
||||
void lcd_puts(int x, int y, const unsigned char *str)
|
||||
{
|
||||
lcd_puts_style(x, y, str, STYLE_DEFAULT);
|
||||
}
|
||||
|
||||
void lcd_puts_style(int x, int y, unsigned char *str, int style)
|
||||
void lcd_puts_style(int x, int y, const unsigned char *str, int style)
|
||||
{
|
||||
int xpos,ypos,w,h;
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
extern void lcd_init(void);
|
||||
extern void lcd_clear_display(void);
|
||||
extern void lcd_backlight(bool on);
|
||||
extern void lcd_puts(int x, int y, unsigned char *string);
|
||||
extern void lcd_puts_style(int x, int y, unsigned char *string, int style);
|
||||
extern void lcd_puts(int x, int y, const unsigned char *string);
|
||||
extern void lcd_puts_style(int x, int y, const unsigned char *string, int style);
|
||||
extern void lcd_putc(int x, int y, unsigned short ch);
|
||||
|
||||
extern void lcd_puts_scroll(int x, int y, unsigned char* string );
|
||||
|
|
@ -142,8 +142,7 @@ extern void lcd_bidir_scroll(int threshold);
|
|||
extern void lcd_scroll_step(int pixels);
|
||||
extern void lcd_setfont(int font);
|
||||
extern void lcd_putsxy(int x, int y, const unsigned char *string);
|
||||
extern int lcd_getstringsize(unsigned char *str, int *w, int *h);
|
||||
extern int lcd_getstringsize(unsigned char *str, int *w, int *h);
|
||||
extern int lcd_getstringsize(const unsigned char *str, int *w, int *h);
|
||||
|
||||
#endif /* CHARCELLS / BITMAP */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue