Killed unnecessary global variables by making them static.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17184 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2008-04-20 10:24:15 +00:00
parent 8924686224
commit db2d61f4ea
9 changed files with 11 additions and 15 deletions

View file

@ -46,7 +46,7 @@ static int enc_menuitem_enteritem(int action,
static void enc_rec_settings_changed(struct encoder_config *cfg); static void enc_rec_settings_changed(struct encoder_config *cfg);
/* this is used by all encoder menu items, /* this is used by all encoder menu items,
MUST be initialised before the call to do_menu() */ MUST be initialised before the call to do_menu() */
struct menucallback_data { static struct menucallback_data {
struct encoder_config *cfg; struct encoder_config *cfg;
bool global; bool global;
} menu_callback_data; } menu_callback_data;

View file

@ -44,9 +44,8 @@
#define SCROLLBAR_WIDTH 6 #define SCROLLBAR_WIDTH 6
#define ICON_PADDING 1 #define ICON_PADDING 1
/* globals */ static struct viewport title_text[NB_SCREENS], title_icons[NB_SCREENS],
struct viewport title_text[NB_SCREENS], title_icons[NB_SCREENS], list_text[NB_SCREENS], list_icons[NB_SCREENS];
list_text[NB_SCREENS], list_icons[NB_SCREENS];
/* should probably be moved somewhere else */ /* should probably be moved somewhere else */
int list_title_height(struct gui_synclist *list, struct viewport *vp) int list_title_height(struct gui_synclist *list, struct viewport *vp)

View file

@ -82,8 +82,8 @@ bool peak_meter_enabled = true;
/** Parameters **/ /** Parameters **/
/* Range */ /* Range */
unsigned short peak_meter_range_min; /* minimum of range in samples */ static unsigned short peak_meter_range_min; /* minimum of range in samples */
unsigned short peak_meter_range_max; /* maximum of range in samples */ static unsigned short peak_meter_range_max; /* maximum of range in samples */
static unsigned short pm_range; /* range width in samples */ static unsigned short pm_range; /* range width in samples */
static bool pm_use_dbfs = true; /* true if peakmeter displays dBfs */ static bool pm_use_dbfs = true; /* true if peakmeter displays dBfs */
static bool level_check; /* true if peeked at peakmeter before drawing */ static bool level_check; /* true if peeked at peakmeter before drawing */

View file

@ -76,9 +76,6 @@ extern void peak_meter_set_trigger_listener(void (*listener)(int status));
extern void peak_meter_draw_trig(int x[], int y[], int trig_width[], extern void peak_meter_draw_trig(int x[], int y[], int trig_width[],
int nb_screens); int nb_screens);
extern unsigned short peak_meter_range_min;
extern unsigned short peak_meter_range_max;
#define DB_SCALE_SRC_VALUES_SIZE 12 #define DB_SCALE_SRC_VALUES_SIZE 12
struct meter_scales{ struct meter_scales{
/* buffered peak values */ /* buffered peak values */

View file

@ -48,7 +48,7 @@
#define DIRCACHE_STOP 2 #define DIRCACHE_STOP 2
#define MAX_OPEN_DIRS 8 #define MAX_OPEN_DIRS 8
DIR_CACHED opendirs[MAX_OPEN_DIRS]; static DIR_CACHED opendirs[MAX_OPEN_DIRS];
static struct dircache_entry *fd_bindings[MAX_OPEN_FILES]; static struct dircache_entry *fd_bindings[MAX_OPEN_FILES];
static struct dircache_entry *dircache_root; static struct dircache_entry *dircache_root;

View file

@ -42,7 +42,7 @@ const struct sound_settings_info audiohw_settings[] = {
}; };
/* Shadow registers */ /* Shadow registers */
struct as3514_info static struct as3514_info
{ {
int vol_r; /* Cached volume level (R) */ int vol_r; /* Cached volume level (R) */
int vol_l; /* Cached volume level (L) */ int vol_l; /* Cached volume level (L) */

View file

@ -246,7 +246,7 @@ static const int sw_cap_high = 191;
static int coef_00, coef_01, coef_10, coef_11; static int coef_00, coef_01, coef_10, coef_11;
/* DAC control register set values */ /* DAC control register set values */
int if_set, sd_set; static int if_set, sd_set;
static inline bool tuner_awake(void) static inline bool tuner_awake(void)
{ {

View file

@ -61,8 +61,8 @@ static unsigned char *eofptr;
/* Font cache structures */ /* Font cache structures */
static struct font_cache font_cache_ui; static struct font_cache font_cache_ui;
static int fnt_file = -1; /* >=0 if font is cached */ static int fnt_file = -1; /* >=0 if font is cached */
uint32_t file_width_offset; /* offset to file width data */ static uint32_t file_width_offset; /* offset to file width data */
uint32_t file_offset_offset; /* offset to file offset data */ static uint32_t file_offset_offset; /* offset to file offset data */
static void cache_create(int maxwidth, int height); static void cache_create(int maxwidth, int height);
static int long_offset = 0; static int long_offset = 0;
static int glyph_file; static int glyph_file;

View file

@ -42,7 +42,7 @@ static void scroll_thread(void);
static char scroll_stack[DEFAULT_STACK_SIZE*3]; static char scroll_stack[DEFAULT_STACK_SIZE*3];
static const char scroll_name[] = "scroll"; static const char scroll_name[] = "scroll";
struct scrollinfo lcd_scroll[LCD_SCROLLABLE_LINES]; static struct scrollinfo lcd_scroll[LCD_SCROLLABLE_LINES];
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
struct scrollinfo lcd_remote_scroll[LCD_REMOTE_SCROLLABLE_LINES]; struct scrollinfo lcd_remote_scroll[LCD_REMOTE_SCROLLABLE_LINES];