summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/cube.c2
-rw-r--r--apps/plugins/dice.c18
-rw-r--r--apps/plugins/dict.c2
-rw-r--r--apps/plugins/disktidy.c24
-rw-r--r--apps/plugins/jackpot.c16
-rw-r--r--apps/plugins/lrcplayer.c2
-rw-r--r--apps/plugins/mp3_encoder.c34
-rw-r--r--apps/plugins/random_folder_advance_config.c22
-rw-r--r--apps/plugins/shopper.c10
-rw-r--r--apps/plugins/snake2.c68
-rw-r--r--apps/plugins/solitaire.c32
-rw-r--r--apps/plugins/sort.c2
-rw-r--r--apps/plugins/stats.c10
-rw-r--r--apps/plugins/stopwatch.c4
14 files changed, 124 insertions, 122 deletions
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index 9540023029..134d7f50ab 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -630,7 +630,7 @@ static void cube_draw(void)
}
}
-void cleanup(void)
+static void cleanup(void)
{
#ifdef USEGSLIB
grey_release();
diff --git a/apps/plugins/dice.c b/apps/plugins/dice.c
index 7acb2e79ca..3bff30d228 100644
--- a/apps/plugins/dice.c
+++ b/apps/plugins/dice.c
@@ -68,10 +68,10 @@ static struct configdata config[] =
{TYPE_ENUM, 0, 8, { .int_p = &sides_index }, "side count", sides_conf}
};
-void dice_init(struct dices* dice);
-void dice_roll(struct dices* dice);
-void dice_print(struct dices* dice, struct screen* display);
-bool dice_menu(struct dices* dice);
+static void dice_init(struct dices* dice);
+static void dice_roll(struct dices* dice);
+static void dice_print(struct dices* dice, struct screen* display);
+static bool dice_menu(struct dices* dice);
/* plugin entry point */
enum plugin_status plugin_start(const void* parameter) {
@@ -107,13 +107,13 @@ enum plugin_status plugin_start(const void* parameter) {
}
}
-void dice_init(struct dices* dice){
+static void dice_init(struct dices* dice){
dice->nb_dices=INITIAL_NB_DICES;
sides_index=INITIAL_NB_SIDES;
}
-void dice_roll(struct dices* dice) {
+static void dice_roll(struct dices* dice) {
int i;
dice->total = 0;
for (i=0; i<dice->nb_dices; i++) {
@@ -122,7 +122,7 @@ void dice_roll(struct dices* dice) {
}
}
-void dice_print_string_buffer(struct dices* dice, char* buffer,
+static void dice_print_string_buffer(struct dices* dice, char* buffer,
int start, int end){
int i, written;
for (i=start; i<end; i++) {
@@ -132,7 +132,7 @@ void dice_print_string_buffer(struct dices* dice, char* buffer,
}
}
-void dice_print(struct dices* dice, struct screen* display){
+static void dice_print(struct dices* dice, struct screen* display){
char buffer[PRINT_BUFFER_LENGTH];
/* display characteristics */
int char_height, char_width;
@@ -171,7 +171,7 @@ void dice_print(struct dices* dice, struct screen* display){
display->update();
}
-bool dice_menu(struct dices * dice) {
+static bool dice_menu(struct dices * dice) {
int selection;
bool menu_quit = false, result = false;
diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c
index a9c481742d..9438c1d022 100644
--- a/apps/plugins/dict.c
+++ b/apps/plugins/dict.c
@@ -48,7 +48,7 @@ struct stWord
#ifdef ROCKBOX_BIG_ENDIAN
#define reverse(x) x
#else
-long reverse (long N) {
+static long reverse (long N) {
unsigned char B[4];
B[0] = (N & 0x000000FF) >> 0;
B[1] = (N & 0x0000FF00) >> 8;
diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c
index 366d4381a6..cedb117304 100644
--- a/apps/plugins/disktidy.c
+++ b/apps/plugins/disktidy.c
@@ -47,7 +47,7 @@ bool tidy_loaded_and_changed = false;
#define DEFAULT_FILES PLUGIN_APPS_DATA_DIR "/disktidy.config"
#define CUSTOM_FILES PLUGIN_APPS_DATA_DIR "/disktidy_custom.config"
-void add_item(const char* name, int index)
+static void add_item(const char* name, int index)
{
char *a;
struct tidy_type *entry = tidy_types + index;
@@ -115,7 +115,7 @@ static int find_file_string(const char *file, char *last_group)
return i;
}
-bool tidy_load_file(const char* file)
+static bool tidy_load_file(const char* file)
{
int fd = rb->open(file, O_RDONLY), i;
char buf[MAX_PATH], *str, *remove;
@@ -165,7 +165,7 @@ static bool match(struct tidy_type *tidy_type, char *string, int len)
string + len - tidy_type->post) == 0);
}
-bool tidy_remove_item(char *item, int attr)
+static bool tidy_remove_item(char *item, int attr)
{
int i;
int len;
@@ -186,7 +186,7 @@ bool tidy_remove_item(char *item, int attr)
return ret;
}
-void tidy_lcd_status(const char *name)
+static void tidy_lcd_status(const char *name)
{
/* display status text */
rb->lcd_clear_display();
@@ -198,7 +198,7 @@ void tidy_lcd_status(const char *name)
rb->lcd_update();
}
-int tidy_path_append_entry(char *path, struct dirent *entry, int *path_length)
+static int tidy_path_append_entry(char *path, struct dirent *entry, int *path_length)
{
int name_len = rb->strlen(entry->d_name);
/* for the special case of path="/" this is one bigger but it's not a problem */
@@ -223,7 +223,7 @@ int tidy_path_append_entry(char *path, struct dirent *entry, int *path_length)
return 1;
}
-void tidy_path_remove_entry(char *path, int old_path_length, int *path_length)
+static void tidy_path_remove_entry(char *path, int old_path_length, int *path_length)
{
path[old_path_length] = '\0';
*path_length = old_path_length;
@@ -233,7 +233,7 @@ void tidy_path_remove_entry(char *path, int old_path_length, int *path_length)
removing all files and directories in that directory.
path is assumed to be array of size MAX_PATH.
*/
-enum tidy_return tidy_removedir(char *path, int *path_length)
+static enum tidy_return tidy_removedir(char *path, int *path_length)
{
/* delete directory */
struct dirent *entry;
@@ -307,7 +307,7 @@ enum tidy_return tidy_removedir(char *path, int *path_length)
}
/* path is assumed to be array of size MAX_PATH */
-enum tidy_return tidy_clean(char *path, int *path_length)
+static enum tidy_return tidy_clean(char *path, int *path_length)
{
/* deletes junk files and dirs left by system */
struct dirent *entry;
@@ -400,7 +400,7 @@ enum tidy_return tidy_clean(char *path, int *path_length)
}
}
-enum tidy_return tidy_do(void)
+static enum tidy_return tidy_do(void)
{
/* clean disk and display num of items removed */
enum tidy_return status;
@@ -432,7 +432,7 @@ enum tidy_return tidy_do(void)
return status;
}
-enum themable_icons get_icon(int item, void * data)
+static enum themable_icons get_icon(int item, void * data)
{
(void)data;
if (tidy_types[item].filestring[0] == '<') /* special type */
@@ -456,7 +456,7 @@ static const char* get_name(int selected_item, void * data,
return tidy_types[selected_item].filestring;
}
-int list_action_callback(int action, struct gui_synclist *lists)
+static int list_action_callback(int action, struct gui_synclist *lists)
{
if (action == ACTION_STD_OK)
{
@@ -499,7 +499,7 @@ int list_action_callback(int action, struct gui_synclist *lists)
return action;
}
-enum tidy_return tidy_lcd_menu(void)
+static enum tidy_return tidy_lcd_menu(void)
{
int selection = 0;
enum tidy_return status = TIDY_RETURN_OK;
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c
index abf1cf8fb2..08eeb2cce1 100644
--- a/apps/plugins/jackpot.c
+++ b/apps/plugins/jackpot.c
@@ -110,14 +110,14 @@ void patterns_deinit(struct screen* display)
#endif /* HAVE_LCD_CHARCELLS */
/*Call when the program exit*/
-void jackpot_exit(void)
+static void jackpot_exit(void)
{
#ifdef HAVE_LCD_CHARCELLS
patterns_deinit(rb->screens[SCREEN_MAIN]);
#endif /* HAVE_LCD_CHARCELLS */
}
-void jackpot_init(struct jackpot* game)
+static void jackpot_init(struct jackpot* game)
{
int i,j;
game->money=20;
@@ -128,7 +128,7 @@ void jackpot_init(struct jackpot* game)
}
}
-int jackpot_get_result(struct jackpot* game)
+static int jackpot_get_result(struct jackpot* game)
{
int i=NB_SLOTS-1;
int multiple=1;
@@ -141,7 +141,7 @@ int jackpot_get_result(struct jackpot* game)
return(result);
}
-int jackpot_get_gain(struct jackpot* game)
+static int jackpot_get_gain(struct jackpot* game)
{
switch (jackpot_get_result(game))
{
@@ -164,7 +164,7 @@ int jackpot_get_gain(struct jackpot* game)
return(0);
}
-void jackpot_display_slot_machine(struct jackpot* game, struct screen* display)
+static void jackpot_display_slot_machine(struct jackpot* game, struct screen* display)
{
char str[20];
int i;
@@ -215,7 +215,7 @@ void jackpot_display_slot_machine(struct jackpot* game, struct screen* display)
}
-void jackpot_info_message(struct screen* display, char* message)
+static void jackpot_info_message(struct screen* display, char* message)
{
#ifdef HAVE_LCD_CHARCELLS
display->puts_scroll(0,1,message);
@@ -232,7 +232,7 @@ void jackpot_info_message(struct screen* display, char* message)
#endif /* HAVE_LCD_CHARCELLS */
}
-void jackpot_print_turn_result(struct jackpot* game,
+static void jackpot_print_turn_result(struct jackpot* game,
int gain, struct screen* display)
{
char str[20];
@@ -250,7 +250,7 @@ void jackpot_print_turn_result(struct jackpot* game,
display->update();
}
-void jackpot_play_turn(struct jackpot* game)
+static void jackpot_play_turn(struct jackpot* game)
{
/* How many pattern? */
int nb_turns[NB_SLOTS];
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c
index a124863cc3..4fb94d741e 100644
--- a/apps/plugins/lrcplayer.c
+++ b/apps/plugins/lrcplayer.c
@@ -148,7 +148,7 @@ static struct viewport vp_lyrics[NB_SCREENS];
#else /* HAVE_LCD_BITMAP */
#define LST_OFF_Y 1
#endif
-int lrc_set_time(const char *title, const char *unit, long *pval,
+static int lrc_set_time(const char *title, const char *unit, long *pval,
int step, int min, int max, int flags)
{
const struct button_mapping *lst_contexts[] = {
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index 11d001cd6a..a99c05dc4c 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -839,7 +839,7 @@ static int count_bigv ( short *ix, uint32_t start, uint32_t end, int table0, in
int *bits);
-bool checkString(int fd, char *string)
+static bool checkString(int fd, char *string)
{
char temp[4];
@@ -849,7 +849,7 @@ bool checkString(int fd, char *string)
return !rb->memcmp(temp, string, 4);
}
-int Read16BitsLowHigh(int fd)
+static int Read16BitsLowHigh(int fd)
{
char first, second;
@@ -860,7 +860,7 @@ int Read16BitsLowHigh(int fd)
}
-int Read32BitsLowHigh(int fd)
+static int Read32BitsLowHigh(int fd)
{
int first = 0xffff & Read16BitsLowHigh(fd);
int second = 0xffff & Read16BitsLowHigh(fd);
@@ -868,7 +868,7 @@ int Read32BitsLowHigh(int fd)
return (second << 16) + first;
}
-int wave_open(void)
+static int wave_open(void)
{
unsigned short wFormatTag;
/* rockbox: comment 'set but unused" variable
@@ -912,7 +912,7 @@ int wave_open(void)
return 0;
}
-int read_samples(uint16_t *buffer, int num_samples)
+static int read_samples(uint16_t *buffer, int num_samples)
{
uint16_t tmpbuf[MAX_SAMP_PER_FRAME*2]; /* SAMP_PER_FRAME*MAX_CHANNELS */
int byte_per_sample = cfg.channels * 2; /* requires bits_per_sample==16 */
@@ -1247,7 +1247,7 @@ void putbits(uint32_t val, uint32_t nbit)
/* of the Huffman tables as defined in the IS (Table B.7), and will not */
/* work with any arbitrary tables. */
/***************************************************************************/
-int choose_table( short *ix, uint32_t begin, uint32_t end, int *bits )
+static int choose_table( short *ix, uint32_t begin, uint32_t end, int *bits )
{
uint32_t i;
int max, table0, table1;
@@ -1392,7 +1392,7 @@ int count_bigv(short *ix, uint32_t start, uint32_t end, int table0,
/* Function: Calculation of rzero, count1, address3 */
/* (Partitions ix into big values, quadruples and zeros). */
/*************************************************************************/
-int calc_runlen( short *ix, side_info_t *si )
+static int calc_runlen( short *ix, side_info_t *si )
{
int p, i, sum = 0;
@@ -1438,7 +1438,7 @@ int calc_runlen( short *ix, side_info_t *si )
/*************************************************************************/
/* Function: Quantization of the vector xr ( -> ix) */
/*************************************************************************/
-int quantize_int(int *xr, short *ix, side_info_t *si)
+static int quantize_int(int *xr, short *ix, side_info_t *si)
{
unsigned int i, idx, s, frac_pow[] = { 0x10000, 0xd745, 0xb505, 0x9838 };
@@ -1470,7 +1470,7 @@ int quantize_int(int *xr, short *ix, side_info_t *si)
/*************************************************************************/
/* subdivides the bigvalue region which will use separate Huffman tables */
/*************************************************************************/
-void subdivide(side_info_t *si)
+static void subdivide(side_info_t *si)
{
int scfb, count0, count1;
@@ -1498,7 +1498,7 @@ void subdivide(side_info_t *si)
/*******************************************************************/
/* Count the number of bits necessary to code the bigvalues region */
/*******************************************************************/
-int bigv_bitcount(short *ix, side_info_t *gi)
+static int bigv_bitcount(short *ix, side_info_t *gi)
{
int b1=0, b2=0, b3=0;
@@ -1519,7 +1519,7 @@ int bigv_bitcount(short *ix, side_info_t *gi)
return b1+b2+b3;
}
-int quantize_and_count_bits(int *xr, short *ix, side_info_t *si)
+static int quantize_and_count_bits(int *xr, short *ix, side_info_t *si)
{
int bits = 10000;
@@ -1536,7 +1536,7 @@ int quantize_and_count_bits(int *xr, short *ix, side_info_t *si)
/************************************************************************/
/* The code selects the best quantStep for a particular set of scalefacs*/
/************************************************************************/
-int inner_loop(int *xr, int max_bits, side_info_t *si)
+static int inner_loop(int *xr, int max_bits, side_info_t *si)
{
int bits;
@@ -1560,7 +1560,7 @@ int inner_loop(int *xr, int max_bits, side_info_t *si)
return bits;
}
-void iteration_loop(int *xr, side_info_t *si, int gr_cnt)
+static void iteration_loop(int *xr, side_info_t *si, int gr_cnt)
{
int remain, tar_bits, max_bits = cfg.mean_bits;
@@ -2072,7 +2072,7 @@ static int find_samplerate_index(uint16_t freq, int *mp3_type)
return 0;
}
-void init_mp3_encoder_engine(bool stereo, int bitrate, uint16_t sample_rate)
+static void init_mp3_encoder_engine(bool stereo, int bitrate, uint16_t sample_rate)
{
uint32_t avg_byte_per_frame;
@@ -2130,7 +2130,7 @@ void init_mp3_encoder_engine(bool stereo, int bitrate, uint16_t sample_rate)
: (cfg.channels == 1 ? 72 : 136));
}
-void set_scale_facs(int *mdct_freq)
+static void set_scale_facs(int *mdct_freq)
{
unsigned int i, is, ie, k, s;
int max_freq_val, avrg_freq_val;
@@ -2163,7 +2163,7 @@ void set_scale_facs(int *mdct_freq)
}
}
-void compress(void)
+static void compress(void)
{
int i, gr, gr_cnt;
uint32_t max;
@@ -2369,7 +2369,7 @@ void compress(void)
int num_file;
char mp3_name[80];
-void get_mp3_filename(const char *wav_name)
+static void get_mp3_filename(const char *wav_name)
{
rb->strlcpy(mp3_name, wav_name, sizeof(mp3_name));
rb->strlcpy(mp3_name + rb->strlen(mp3_name) - 4, ".mp3", 5);
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c
index e15cade643..18899644cc 100644
--- a/apps/plugins/random_folder_advance_config.c
+++ b/apps/plugins/random_folder_advance_config.c
@@ -43,7 +43,7 @@ struct file_format {
};
struct file_format *list = NULL;
-void update_screen(bool clear)
+static void update_screen(bool clear)
{
char buf[15];
int i;
@@ -58,7 +58,7 @@ void update_screen(bool clear)
}
}
-void traversedir(char* location, char* name)
+static void traversedir(char* location, char* name)
{
struct dirent *entry;
DIR* dir;
@@ -126,7 +126,7 @@ void traversedir(char* location, char* name)
}
}
-bool custom_dir(void)
+static bool custom_dir(void)
{
DIR* dir_check;
char *starts, line[MAX_PATH], formatted_line[MAX_PATH];
@@ -212,7 +212,7 @@ bool custom_dir(void)
return true;
}
-void generate(void)
+static void generate(void)
{
dirs_count = 0;
cancel = false;
@@ -245,7 +245,7 @@ static const char* list_get_name_cb(int selected_item, void* data,
return buf;
}
-int load_list(void)
+static int load_list(void)
{
int myfd = rb->open(RFA_FILE,O_RDONLY);
if (myfd < 0)
@@ -263,7 +263,7 @@ int load_list(void)
return 0;
}
-int save_list(void)
+static int save_list(void)
{
int myfd = rb->creat(RFA_FILE, 0666);
if (myfd < 0)
@@ -288,7 +288,7 @@ int save_list(void)
return 1;
}
-int edit_list(void)
+static int edit_list(void)
{
struct gui_synclist lists;
bool exit = false;
@@ -373,7 +373,7 @@ int edit_list(void)
return ret;
}
-int export_list_to_file_text(void)
+static int export_list_to_file_text(void)
{
int i = 0;
/* load the dat file if not already done */
@@ -412,7 +412,7 @@ int export_list_to_file_text(void)
return 1;
}
-int import_list_from_file_text(void)
+static int import_list_from_file_text(void)
{
char line[MAX_PATH];
@@ -465,7 +465,7 @@ int import_list_from_file_text(void)
return list->count;
}
-int start_shuffled_play(void)
+static int start_shuffled_play(void)
{
int *order;
size_t max_shuffle_size;
@@ -539,7 +539,7 @@ int start_shuffled_play(void)
return 1;
}
-enum plugin_status main_menu(void)
+static enum plugin_status main_menu(void)
{
bool exit = false;
MENUITEM_STRINGLIST(menu, "Main Menu", NULL,
diff --git a/apps/plugins/shopper.c b/apps/plugins/shopper.c
index 61cf2953af..15b44ca21a 100644
--- a/apps/plugins/shopper.c
+++ b/apps/plugins/shopper.c
@@ -75,7 +75,7 @@ static enum themable_icons list_get_icon_cb(int selected_item, void *data)
return Icon_NOICON;
}
-bool save_changes(void)
+static bool save_changes(void)
{
int fd;
int i;
@@ -123,7 +123,7 @@ bool save_changes(void)
return true;
}
-void create_view(struct gui_synclist *lists)
+static void create_view(struct gui_synclist *lists)
{
unsigned int cnt = 0;
int i, j;
@@ -168,7 +168,7 @@ void create_view(struct gui_synclist *lists)
}
}
-bool toggle(int selected_item)
+static bool toggle(int selected_item)
{
if (items_list[view_id_list[selected_item]].flag == FL_CATEGORY)
return false;
@@ -179,7 +179,7 @@ bool toggle(int selected_item)
return true;
}
-void update_category_string(void)
+static void update_category_string(void)
{
if (show_categories)
rb->strcpy(category_string,"Hide categories");
@@ -187,7 +187,7 @@ void update_category_string(void)
rb->strcpy(category_string,"Show categories");
}
-enum plugin_status load_file(void)
+static enum plugin_status load_file(void)
{
int fd;
static char temp_line[DESC_SIZE];
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index 3d8b973074..3368f4e2ab 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -415,7 +415,7 @@ static struct highscore highscores[NUM_SCORES];
#define LEVELS_FILE PLUGIN_GAMES_DIR "/snake2.levels"
#define SCORE_FILE PLUGIN_GAMES_DATA_DIR "/snake2.score"
-int load_all_levels(void)
+static int load_all_levels(void)
{
int linecnt = 0;
int fd;
@@ -465,7 +465,7 @@ int load_all_levels(void)
** Completely clear the board of walls and/or snake
*/
-void clear_board( void)
+static void clear_board( void)
{
int x,y;
@@ -478,7 +478,7 @@ void clear_board( void)
}
}
-int load_level( int level_number )
+static int load_level( int level_number )
{
int x,y;
clear_board();
@@ -510,7 +510,7 @@ int load_level( int level_number )
** in the direction buffer. If there is something in the
** next part of the buffer then that is moved to the first place
*/
-void get_direction( void )
+static void get_direction( void )
{
/*if 1st place is empty*/
if(ardirectionbuffer[0] != -1)
@@ -532,7 +532,7 @@ void get_direction( void )
/*
** Sets the direction
*/
-void set_direction(int newdir)
+static void set_direction(int newdir)
{
if(ardirectionbuffer[0] != newdir)
{
@@ -552,7 +552,7 @@ void set_direction(int newdir)
}
}
-void new_level(int level)
+static void new_level(int level)
{
load_level(level);
@@ -573,7 +573,7 @@ void new_level(int level)
num_apples_to_got=0;
}
-void init_snake(void)
+static void init_snake(void)
{
num_apples_to_get=1;
if(game_type == 1)
@@ -583,7 +583,7 @@ void init_snake(void)
}
#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128)
-void draw_frame_bitmap(int header_type)
+static void draw_frame_bitmap(int header_type)
{
rb->lcd_bitmap(header_type==1? snake2_header1: snake2_header2, 0, 0,
BMPWIDTH_snake2_header, BMPHEIGHT_snake2_header);
@@ -602,7 +602,7 @@ void draw_frame_bitmap(int header_type)
** Draws the apple. If it doesn't exist then
** a new one get's created.
*/
-void draw_apple_bit(int x, int y)
+static void draw_apple_bit(int x, int y)
{
rb->lcd_fillrect((CENTER_X+x*MULTIPLIER)+1, CENTER_Y+y*MULTIPLIER,
MODIFIER_2, MODIFIER_1);
@@ -610,7 +610,7 @@ void draw_apple_bit(int x, int y)
MODIFIER_1, MODIFIER_2);
}
-void draw_apple( void )
+static void draw_apple( void )
{
int x,y;
@@ -646,7 +646,7 @@ void draw_apple( void )
* x x *
* x x *
*/
-void draw_vertical_bit(int x, int y)
+static void draw_vertical_bit(int x, int y)
{
rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER,
MODIFIER_2, MODIFIER_1);
@@ -658,7 +658,7 @@ void draw_vertical_bit(int x, int y)
X X X X
* * * *
*/
-void draw_horizontal_bit(int x, int y)
+static void draw_horizontal_bit(int x, int y)
{
rb->lcd_fillrect(CENTER_X+x*MULTIPLIER, CENTER_Y+y*MULTIPLIER+1,
MODIFIER_1, MODIFIER_2);
@@ -670,7 +670,7 @@ void draw_horizontal_bit(int x, int y)
* X X X
* X X *
*/
-void draw_n_to_e_bit(int x, int y)
+static void draw_n_to_e_bit(int x, int y)
{
rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER+2,
MODIFIER_2, MODIFIER_2);
@@ -684,7 +684,7 @@ void draw_n_to_e_bit(int x, int y)
* X X X
* X X *
*/
-void draw_w_to_s_bit(int x, int y)
+static void draw_w_to_s_bit(int x, int y)
{
draw_n_to_e_bit(x,y);
}
@@ -695,7 +695,7 @@ void draw_w_to_s_bit(int x, int y)
X X X *
* X X *
*/
-void draw_n_to_w_bit(int x, int y)
+static void draw_n_to_w_bit(int x, int y)
{
rb->lcd_fillrect(CENTER_X+x*MULTIPLIER, CENTER_Y+y*MULTIPLIER+1,
MODIFIER_2, MODIFIER_2);
@@ -709,7 +709,7 @@ void draw_n_to_w_bit(int x, int y)
X X X *
* X X *
*/
-void draw_e_to_s_bit(int x, int y)
+static void draw_e_to_s_bit(int x, int y)
{
draw_n_to_w_bit(x, y);
}
@@ -720,7 +720,7 @@ void draw_e_to_s_bit(int x, int y)
* * X X
* * * *
*/
-void draw_s_to_e_bit(int x, int y)
+static void draw_s_to_e_bit(int x, int y)
{
rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER,
MODIFIER_2, MODIFIER_2);
@@ -734,7 +734,7 @@ void draw_s_to_e_bit(int x, int y)
* * X X
* * * *
*/
-void draw_w_to_n_bit(int x, int y)
+static void draw_w_to_n_bit(int x, int y)
{
draw_s_to_e_bit(x,y);
}
@@ -745,7 +745,7 @@ void draw_w_to_n_bit(int x, int y)
X X * *
* * * *
*/
-void draw_e_to_n_bit(int x, int y)
+static void draw_e_to_n_bit(int x, int y)
{
rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER,
MODIFIER_2, MODIFIER_2);
@@ -759,21 +759,22 @@ void draw_e_to_n_bit(int x, int y)
X X * *
* * * *
*/
-void draw_s_to_w_bit(int x, int y)
+static void draw_s_to_w_bit(int x, int y)
{
draw_e_to_n_bit(x, y);
}
-void draw_head_bit(int x, int y)
+static void draw_head_bit(int x, int y)
{
rb->lcd_fillrect(CENTER_X+x*MULTIPLIER, CENTER_Y+y*MULTIPLIER,
MODIFIER_1, MODIFIER_1);
}
+#if 0 /* unused */
/*
** Draws a wall/obsticals
*/
-void draw_boundary ( void )
+static void draw_boundary ( void )
{
int x, y;
@@ -799,11 +800,12 @@ void draw_boundary ( void )
board[0][HEIGHT-1] = SOUTH_EAST;
board[WIDTH-1][HEIGHT-1] = EAST_NORTH;
}
+#endif
/*
** Redraw the entire board
*/
-void redraw (void)
+static void redraw (void)
{
int x,y;
@@ -860,7 +862,7 @@ void redraw (void)
** Draws the snake bit described by nCurrentBit at position x/y
** deciding whether it's a corner bit by examing the nPrevious bit
*/
-void draw_snake_bit(int currentbit, int previousbit, int x, int y)
+static void draw_snake_bit(int currentbit, int previousbit, int x, int y)
{
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
draw_head_bit(x, y);
@@ -942,7 +944,7 @@ void draw_snake_bit(int currentbit, int previousbit, int x, int y)
}
}
-void redraw_snake(void)
+static void redraw_snake(void)
{
int x = tailx, y = taily;
int olddir, newdir = board[x][y];
@@ -989,7 +991,7 @@ void redraw_snake(void)
/*
** Death 'sequence' and end game stuff.
*/
-void die (void)
+static void die (void)
{
int button;
bool done=false;
@@ -1045,7 +1047,7 @@ void die (void)
** sets of the death sequence. What we want is it to only return a true/false
** depending on whether a collision occured.
*/
-void collision ( int x, int y )
+static void collision ( int x, int y )
{
int bdeath=0;
@@ -1096,7 +1098,7 @@ void collision ( int x, int y )
}
}
-void move( void )
+static void move( void )
{
int taildir;
/*this actually sets the dir variable.*/
@@ -1177,7 +1179,7 @@ void move( void )
applecountdown--;
}
-void frame (void)
+static void frame (void)
{
int olddir, noldx, noldy, temp;
noldx = headx;
@@ -1235,7 +1237,7 @@ void frame (void)
rb->lcd_update();
}
-void game_pause (void)
+static void game_pause (void)
{
int button;
@@ -1276,7 +1278,7 @@ void game_pause (void)
}
}
-void game (void)
+static void game (void)
{
int button;
@@ -1365,7 +1367,7 @@ void game (void)
}
-void select_maze(void)
+static void select_maze(void)
{
int button;
@@ -1440,7 +1442,7 @@ void select_maze(void)
}
-void game_init(void)
+static void game_init(void)
{
int selection = 0;
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 7ff75537aa..42069d813f 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -802,7 +802,7 @@ void solitaire_init(void);
enum { MENU_RESUME, MENU_SAVE_AND_QUIT, MENU_QUIT, MENU_USB };
static bool _ingame;
-int solitaire_menu_cb(int action, const struct menu_item_ex *this_item)
+static int solitaire_menu_cb(int action, const struct menu_item_ex *this_item)
{
int i = (intptr_t)this_item;
if( action == ACTION_REQUEST_MENUITEM )
@@ -813,7 +813,7 @@ int solitaire_menu_cb(int action, const struct menu_item_ex *this_item)
return action;
}
-int solitaire_menu(bool in_game)
+static int solitaire_menu(bool in_game)
{
int selected = 0;
int result = -1;
@@ -907,7 +907,7 @@ int stacks[SUITS];
* Card handling routines
*/
-int next_random_card( card_t *deck )
+static int next_random_card( card_t *deck )
{
int i,r;
@@ -1012,7 +1012,7 @@ void solitaire_init( void )
}
/* find the column number in which 'card' can be found */
-int find_card_col( int card )
+static int find_card_col( int card )
{
int i;
int c;
@@ -1044,7 +1044,7 @@ int find_card_col( int card )
/* find the card preceding 'card' */
/* if it doesn't exist, return NOT_A_CARD */
-int find_prev_card( int card ){
+static int find_prev_card( int card ){
int i;
for( i=0; i < NUM_CARDS; i++ )
@@ -1056,7 +1056,7 @@ int find_prev_card( int card ){
}
/* find the last card of a given column */
-int find_last_card( int col )
+static int find_last_card( int col )
{
int c;
@@ -1085,7 +1085,7 @@ int find_last_card( int col )
enum move { MOVE_OK, MOVE_NOT_OK };
-enum move move_card( int dest_col, int src_card )
+static enum move move_card( int dest_col, int src_card )
{
/* the column on which to take src_card */
int src_col;
@@ -1238,7 +1238,7 @@ enum { SOLITAIRE_WIN, SOLITAIRE_SAVE_AND_QUIT, SOLITAIRE_QUIT, SOLITAIRE_USB };
#define BC_MYSPEED (6*BC_ACCEL)
#define BC_MXSPEED (6*LCD_HEIGHT/128)
-int bouncing_cards( void )
+static int bouncing_cards( void )
{
int i, j, x, vx, y, fp_y, fp_vy, button;
@@ -1299,7 +1299,7 @@ int bouncing_cards( void )
/**
* Game save/load routines
*/
-void get_save_filename( char *buf )
+static void get_save_filename( char *buf )
{
#ifdef APPLICATION
rb->snprintf(buf, sizeof(buf), PLUGIN_DATA_DIR "/sol.save");
@@ -1312,14 +1312,14 @@ void get_save_filename( char *buf )
#endif
}
-int open_save_file( int flags )
+static int open_save_file( int flags )
{
char buf[MAX_PATH];
get_save_filename( buf );
return rb->open( buf, flags, 0666);
}
-void delete_save_file( void )
+static void delete_save_file( void )
{
char buf[MAX_PATH];
get_save_filename( buf );
@@ -1329,7 +1329,7 @@ void delete_save_file( void )
#ifdef write
# undef write
#endif
-int save_write( int fd, const void *buf, size_t count, int *checksum )
+static int save_write( int fd, const void *buf, size_t count, int *checksum )
{
size_t i;
if( rb->write( fd, buf, count ) < (ssize_t)count )
@@ -1342,7 +1342,7 @@ int save_write( int fd, const void *buf, size_t count, int *checksum )
#ifdef read
# undef read
#endif
-int save_read( int fd, void *buf, size_t count, int *checksum )
+static int save_read( int fd, void *buf, size_t count, int *checksum )
{
size_t i;
if( rb->read( fd, buf, count ) < (ssize_t)count )
@@ -1352,7 +1352,7 @@ int save_read( int fd, void *buf, size_t count, int *checksum )
return 0;
}
-int save_game( void )
+static int save_game( void )
{
int fd = open_save_file( O_CREAT|O_WRONLY|O_TRUNC );
int checksum = 42;
@@ -1378,7 +1378,7 @@ int save_game( void )
return 0;
}
-int load_game( void )
+static int load_game( void )
{
int checksum, retval;
@@ -1422,7 +1422,7 @@ int load_game( void )
* game will resume.
*/
-int solitaire( int skipmenu )
+static int solitaire( int skipmenu )
{
int i,j;
diff --git a/apps/plugins/sort.c b/apps/plugins/sort.c
index f8c3f5c248..f3ea5f0a3d 100644
--- a/apps/plugins/sort.c
+++ b/apps/plugins/sort.c
@@ -81,7 +81,7 @@ static void sort_buffer(void)
rb->qsort(pointers, num_entries, sizeof(char *), compare);
}
-int read_buffer(int offset)
+static int read_buffer(int offset)
{
int fd;
char *buf_ptr;
diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c
index 07f2f8efb8..5392910a15 100644
--- a/apps/plugins/stats.c
+++ b/apps/plugins/stats.c
@@ -115,12 +115,12 @@ static bool cancel;
#endif
/* we don't have yet a filetype attribute for image files */
-const char *image_exts[] = {"bmp","jpg","jpe","jpeg","png","ppm"};
+static const char *image_exts[] = {"bmp","jpg","jpe","jpeg","png","ppm"};
/* neither for video ones */
-const char *video_exts[] = {"mpg","mpeg","mpv","m2v"};
+static const char *video_exts[] = {"mpg","mpeg","mpv","m2v"};
-void prn(const char *str, int y)
+static void prn(const char *str, int y)
{
rb->lcd_puts(0,y,str);
#ifdef HAVE_REMOTE_LCD
@@ -128,7 +128,7 @@ void prn(const char *str, int y)
#endif
}
-void update_screen(void)
+static void update_screen(void)
{
char buf[32];
@@ -165,7 +165,7 @@ void update_screen(void)
#endif
}
-void traversedir(char* location, char* name)
+static void traversedir(char* location, char* name)
{
int button;
struct dirent *entry;
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c
index f70d26bc56..8e3cf8a221 100644
--- a/apps/plugins/stopwatch.c
+++ b/apps/plugins/stopwatch.c
@@ -330,7 +330,7 @@ static void ticks_to_string(int ticks,int lap,int buflen, char * buf)
/*
* Load saved stopwatch state, if exists.
*/
-void load_stopwatch(void)
+static void load_stopwatch(void)
{
int fd;
@@ -370,7 +370,7 @@ void load_stopwatch(void)
/*
* Save stopwatch state.
*/
-void save_stopwatch(void)
+static void save_stopwatch(void)
{
int fd;