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)
630 } 630 }
631} 631}
632 632
633void cleanup(void) 633static void cleanup(void)
634{ 634{
635#ifdef USEGSLIB 635#ifdef USEGSLIB
636 grey_release(); 636 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[] =
68 {TYPE_ENUM, 0, 8, { .int_p = &sides_index }, "side count", sides_conf} 68 {TYPE_ENUM, 0, 8, { .int_p = &sides_index }, "side count", sides_conf}
69}; 69};
70 70
71void dice_init(struct dices* dice); 71static void dice_init(struct dices* dice);
72void dice_roll(struct dices* dice); 72static void dice_roll(struct dices* dice);
73void dice_print(struct dices* dice, struct screen* display); 73static void dice_print(struct dices* dice, struct screen* display);
74bool dice_menu(struct dices* dice); 74static bool dice_menu(struct dices* dice);
75 75
76/* plugin entry point */ 76/* plugin entry point */
77enum plugin_status plugin_start(const void* parameter) { 77enum plugin_status plugin_start(const void* parameter) {
@@ -107,13 +107,13 @@ enum plugin_status plugin_start(const void* parameter) {
107 } 107 }
108} 108}
109 109
110void dice_init(struct dices* dice){ 110static void dice_init(struct dices* dice){
111 dice->nb_dices=INITIAL_NB_DICES; 111 dice->nb_dices=INITIAL_NB_DICES;
112 sides_index=INITIAL_NB_SIDES; 112 sides_index=INITIAL_NB_SIDES;
113 113
114} 114}
115 115
116void dice_roll(struct dices* dice) { 116static void dice_roll(struct dices* dice) {
117 int i; 117 int i;
118 dice->total = 0; 118 dice->total = 0;
119 for (i=0; i<dice->nb_dices; i++) { 119 for (i=0; i<dice->nb_dices; i++) {
@@ -122,7 +122,7 @@ void dice_roll(struct dices* dice) {
122 } 122 }
123} 123}
124 124
125void dice_print_string_buffer(struct dices* dice, char* buffer, 125static void dice_print_string_buffer(struct dices* dice, char* buffer,
126 int start, int end){ 126 int start, int end){
127 int i, written; 127 int i, written;
128 for (i=start; i<end; i++) { 128 for (i=start; i<end; i++) {
@@ -132,7 +132,7 @@ void dice_print_string_buffer(struct dices* dice, char* buffer,
132 } 132 }
133} 133}
134 134
135void dice_print(struct dices* dice, struct screen* display){ 135static void dice_print(struct dices* dice, struct screen* display){
136 char buffer[PRINT_BUFFER_LENGTH]; 136 char buffer[PRINT_BUFFER_LENGTH];
137 /* display characteristics */ 137 /* display characteristics */
138 int char_height, char_width; 138 int char_height, char_width;
@@ -171,7 +171,7 @@ void dice_print(struct dices* dice, struct screen* display){
171 display->update(); 171 display->update();
172} 172}
173 173
174bool dice_menu(struct dices * dice) { 174static bool dice_menu(struct dices * dice) {
175 int selection; 175 int selection;
176 bool menu_quit = false, result = false; 176 bool menu_quit = false, result = false;
177 177
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
48#ifdef ROCKBOX_BIG_ENDIAN 48#ifdef ROCKBOX_BIG_ENDIAN
49#define reverse(x) x 49#define reverse(x) x
50#else 50#else
51long reverse (long N) { 51static long reverse (long N) {
52 unsigned char B[4]; 52 unsigned char B[4];
53 B[0] = (N & 0x000000FF) >> 0; 53 B[0] = (N & 0x000000FF) >> 0;
54 B[1] = (N & 0x0000FF00) >> 8; 54 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;
47#define DEFAULT_FILES PLUGIN_APPS_DATA_DIR "/disktidy.config" 47#define DEFAULT_FILES PLUGIN_APPS_DATA_DIR "/disktidy.config"
48#define CUSTOM_FILES PLUGIN_APPS_DATA_DIR "/disktidy_custom.config" 48#define CUSTOM_FILES PLUGIN_APPS_DATA_DIR "/disktidy_custom.config"
49 49
50void add_item(const char* name, int index) 50static void add_item(const char* name, int index)
51{ 51{
52 char *a; 52 char *a;
53 struct tidy_type *entry = tidy_types + index; 53 struct tidy_type *entry = tidy_types + index;
@@ -115,7 +115,7 @@ static int find_file_string(const char *file, char *last_group)
115 return i; 115 return i;
116} 116}
117 117
118bool tidy_load_file(const char* file) 118static bool tidy_load_file(const char* file)
119{ 119{
120 int fd = rb->open(file, O_RDONLY), i; 120 int fd = rb->open(file, O_RDONLY), i;
121 char buf[MAX_PATH], *str, *remove; 121 char buf[MAX_PATH], *str, *remove;
@@ -165,7 +165,7 @@ static bool match(struct tidy_type *tidy_type, char *string, int len)
165 string + len - tidy_type->post) == 0); 165 string + len - tidy_type->post) == 0);
166} 166}
167 167
168bool tidy_remove_item(char *item, int attr) 168static bool tidy_remove_item(char *item, int attr)
169{ 169{
170 int i; 170 int i;
171 int len; 171 int len;
@@ -186,7 +186,7 @@ bool tidy_remove_item(char *item, int attr)
186 return ret; 186 return ret;
187} 187}
188 188
189void tidy_lcd_status(const char *name) 189static void tidy_lcd_status(const char *name)
190{ 190{
191 /* display status text */ 191 /* display status text */
192 rb->lcd_clear_display(); 192 rb->lcd_clear_display();
@@ -198,7 +198,7 @@ void tidy_lcd_status(const char *name)
198 rb->lcd_update(); 198 rb->lcd_update();
199} 199}
200 200
201int tidy_path_append_entry(char *path, struct dirent *entry, int *path_length) 201static int tidy_path_append_entry(char *path, struct dirent *entry, int *path_length)
202{ 202{
203 int name_len = rb->strlen(entry->d_name); 203 int name_len = rb->strlen(entry->d_name);
204 /* for the special case of path="/" this is one bigger but it's not a problem */ 204 /* 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)
223 return 1; 223 return 1;
224} 224}
225 225
226void tidy_path_remove_entry(char *path, int old_path_length, int *path_length) 226static void tidy_path_remove_entry(char *path, int old_path_length, int *path_length)
227{ 227{
228 path[old_path_length] = '\0'; 228 path[old_path_length] = '\0';
229 *path_length = old_path_length; 229 *path_length = old_path_length;
@@ -233,7 +233,7 @@ void tidy_path_remove_entry(char *path, int old_path_length, int *path_length)
233 removing all files and directories in that directory. 233 removing all files and directories in that directory.
234 path is assumed to be array of size MAX_PATH. 234 path is assumed to be array of size MAX_PATH.
235*/ 235*/
236enum tidy_return tidy_removedir(char *path, int *path_length) 236static enum tidy_return tidy_removedir(char *path, int *path_length)
237{ 237{
238 /* delete directory */ 238 /* delete directory */
239 struct dirent *entry; 239 struct dirent *entry;
@@ -307,7 +307,7 @@ enum tidy_return tidy_removedir(char *path, int *path_length)
307} 307}
308 308
309/* path is assumed to be array of size MAX_PATH */ 309/* path is assumed to be array of size MAX_PATH */
310enum tidy_return tidy_clean(char *path, int *path_length) 310static enum tidy_return tidy_clean(char *path, int *path_length)
311{ 311{
312 /* deletes junk files and dirs left by system */ 312 /* deletes junk files and dirs left by system */
313 struct dirent *entry; 313 struct dirent *entry;
@@ -400,7 +400,7 @@ enum tidy_return tidy_clean(char *path, int *path_length)
400 } 400 }
401} 401}
402 402
403enum tidy_return tidy_do(void) 403static enum tidy_return tidy_do(void)
404{ 404{
405 /* clean disk and display num of items removed */ 405 /* clean disk and display num of items removed */
406 enum tidy_return status; 406 enum tidy_return status;
@@ -432,7 +432,7 @@ enum tidy_return tidy_do(void)
432 return status; 432 return status;
433} 433}
434 434
435enum themable_icons get_icon(int item, void * data) 435static enum themable_icons get_icon(int item, void * data)
436{ 436{
437 (void)data; 437 (void)data;
438 if (tidy_types[item].filestring[0] == '<') /* special type */ 438 if (tidy_types[item].filestring[0] == '<') /* special type */
@@ -456,7 +456,7 @@ static const char* get_name(int selected_item, void * data,
456 return tidy_types[selected_item].filestring; 456 return tidy_types[selected_item].filestring;
457} 457}
458 458
459int list_action_callback(int action, struct gui_synclist *lists) 459static int list_action_callback(int action, struct gui_synclist *lists)
460{ 460{
461 if (action == ACTION_STD_OK) 461 if (action == ACTION_STD_OK)
462 { 462 {
@@ -499,7 +499,7 @@ int list_action_callback(int action, struct gui_synclist *lists)
499 return action; 499 return action;
500} 500}
501 501
502enum tidy_return tidy_lcd_menu(void) 502static enum tidy_return tidy_lcd_menu(void)
503{ 503{
504 int selection = 0; 504 int selection = 0;
505 enum tidy_return status = TIDY_RETURN_OK; 505 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)
110#endif /* HAVE_LCD_CHARCELLS */ 110#endif /* HAVE_LCD_CHARCELLS */
111 111
112/*Call when the program exit*/ 112/*Call when the program exit*/
113void jackpot_exit(void) 113static void jackpot_exit(void)
114{ 114{
115#ifdef HAVE_LCD_CHARCELLS 115#ifdef HAVE_LCD_CHARCELLS
116 patterns_deinit(rb->screens[SCREEN_MAIN]); 116 patterns_deinit(rb->screens[SCREEN_MAIN]);
117#endif /* HAVE_LCD_CHARCELLS */ 117#endif /* HAVE_LCD_CHARCELLS */
118} 118}
119 119
120void jackpot_init(struct jackpot* game) 120static void jackpot_init(struct jackpot* game)
121{ 121{
122 int i,j; 122 int i,j;
123 game->money=20; 123 game->money=20;
@@ -128,7 +128,7 @@ void jackpot_init(struct jackpot* game)
128 } 128 }
129} 129}
130 130
131int jackpot_get_result(struct jackpot* game) 131static int jackpot_get_result(struct jackpot* game)
132{ 132{
133 int i=NB_SLOTS-1; 133 int i=NB_SLOTS-1;
134 int multiple=1; 134 int multiple=1;
@@ -141,7 +141,7 @@ int jackpot_get_result(struct jackpot* game)
141 return(result); 141 return(result);
142} 142}
143 143
144int jackpot_get_gain(struct jackpot* game) 144static int jackpot_get_gain(struct jackpot* game)
145{ 145{
146 switch (jackpot_get_result(game)) 146 switch (jackpot_get_result(game))
147 { 147 {
@@ -164,7 +164,7 @@ int jackpot_get_gain(struct jackpot* game)
164 return(0); 164 return(0);
165} 165}
166 166
167void jackpot_display_slot_machine(struct jackpot* game, struct screen* display) 167static void jackpot_display_slot_machine(struct jackpot* game, struct screen* display)
168{ 168{
169 char str[20]; 169 char str[20];
170 int i; 170 int i;
@@ -215,7 +215,7 @@ void jackpot_display_slot_machine(struct jackpot* game, struct screen* display)
215} 215}
216 216
217 217
218void jackpot_info_message(struct screen* display, char* message) 218static void jackpot_info_message(struct screen* display, char* message)
219{ 219{
220#ifdef HAVE_LCD_CHARCELLS 220#ifdef HAVE_LCD_CHARCELLS
221 display->puts_scroll(0,1,message); 221 display->puts_scroll(0,1,message);
@@ -232,7 +232,7 @@ void jackpot_info_message(struct screen* display, char* message)
232#endif /* HAVE_LCD_CHARCELLS */ 232#endif /* HAVE_LCD_CHARCELLS */
233} 233}
234 234
235void jackpot_print_turn_result(struct jackpot* game, 235static void jackpot_print_turn_result(struct jackpot* game,
236 int gain, struct screen* display) 236 int gain, struct screen* display)
237{ 237{
238 char str[20]; 238 char str[20];
@@ -250,7 +250,7 @@ void jackpot_print_turn_result(struct jackpot* game,
250 display->update(); 250 display->update();
251} 251}
252 252
253void jackpot_play_turn(struct jackpot* game) 253static void jackpot_play_turn(struct jackpot* game)
254{ 254{
255 /* How many pattern? */ 255 /* How many pattern? */
256 int nb_turns[NB_SLOTS]; 256 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];
148#else /* HAVE_LCD_BITMAP */ 148#else /* HAVE_LCD_BITMAP */
149#define LST_OFF_Y 1 149#define LST_OFF_Y 1
150#endif 150#endif
151int lrc_set_time(const char *title, const char *unit, long *pval, 151static int lrc_set_time(const char *title, const char *unit, long *pval,
152 int step, int min, int max, int flags) 152 int step, int min, int max, int flags)
153{ 153{
154 const struct button_mapping *lst_contexts[] = { 154 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
839 int *bits); 839 int *bits);
840 840
841 841
842bool checkString(int fd, char *string) 842static bool checkString(int fd, char *string)
843{ 843{
844 char temp[4]; 844 char temp[4];
845 845
@@ -849,7 +849,7 @@ bool checkString(int fd, char *string)
849 return !rb->memcmp(temp, string, 4); 849 return !rb->memcmp(temp, string, 4);
850} 850}
851 851
852int Read16BitsLowHigh(int fd) 852static int Read16BitsLowHigh(int fd)
853{ 853{
854 char first, second; 854 char first, second;
855 855
@@ -860,7 +860,7 @@ int Read16BitsLowHigh(int fd)
860} 860}
861 861
862 862
863int Read32BitsLowHigh(int fd) 863static int Read32BitsLowHigh(int fd)
864{ 864{
865 int first = 0xffff & Read16BitsLowHigh(fd); 865 int first = 0xffff & Read16BitsLowHigh(fd);
866 int second = 0xffff & Read16BitsLowHigh(fd); 866 int second = 0xffff & Read16BitsLowHigh(fd);
@@ -868,7 +868,7 @@ int Read32BitsLowHigh(int fd)
868 return (second << 16) + first; 868 return (second << 16) + first;
869} 869}
870 870
871int wave_open(void) 871static int wave_open(void)
872{ 872{
873 unsigned short wFormatTag; 873 unsigned short wFormatTag;
874 /* rockbox: comment 'set but unused" variable 874 /* rockbox: comment 'set but unused" variable
@@ -912,7 +912,7 @@ int wave_open(void)
912 return 0; 912 return 0;
913} 913}
914 914
915int read_samples(uint16_t *buffer, int num_samples) 915static int read_samples(uint16_t *buffer, int num_samples)
916{ 916{
917 uint16_t tmpbuf[MAX_SAMP_PER_FRAME*2]; /* SAMP_PER_FRAME*MAX_CHANNELS */ 917 uint16_t tmpbuf[MAX_SAMP_PER_FRAME*2]; /* SAMP_PER_FRAME*MAX_CHANNELS */
918 int byte_per_sample = cfg.channels * 2; /* requires bits_per_sample==16 */ 918 int byte_per_sample = cfg.channels * 2; /* requires bits_per_sample==16 */
@@ -1247,7 +1247,7 @@ void putbits(uint32_t val, uint32_t nbit)
1247/* of the Huffman tables as defined in the IS (Table B.7), and will not */ 1247/* of the Huffman tables as defined in the IS (Table B.7), and will not */
1248/* work with any arbitrary tables. */ 1248/* work with any arbitrary tables. */
1249/***************************************************************************/ 1249/***************************************************************************/
1250int choose_table( short *ix, uint32_t begin, uint32_t end, int *bits ) 1250static int choose_table( short *ix, uint32_t begin, uint32_t end, int *bits )
1251{ 1251{
1252 uint32_t i; 1252 uint32_t i;
1253 int max, table0, table1; 1253 int max, table0, table1;
@@ -1392,7 +1392,7 @@ int count_bigv(short *ix, uint32_t start, uint32_t end, int table0,
1392/* Function: Calculation of rzero, count1, address3 */ 1392/* Function: Calculation of rzero, count1, address3 */
1393/* (Partitions ix into big values, quadruples and zeros). */ 1393/* (Partitions ix into big values, quadruples and zeros). */
1394/*************************************************************************/ 1394/*************************************************************************/
1395int calc_runlen( short *ix, side_info_t *si ) 1395static int calc_runlen( short *ix, side_info_t *si )
1396{ 1396{
1397 int p, i, sum = 0; 1397 int p, i, sum = 0;
1398 1398
@@ -1438,7 +1438,7 @@ int calc_runlen( short *ix, side_info_t *si )
1438/*************************************************************************/ 1438/*************************************************************************/
1439/* Function: Quantization of the vector xr ( -> ix) */ 1439/* Function: Quantization of the vector xr ( -> ix) */
1440/*************************************************************************/ 1440/*************************************************************************/
1441int quantize_int(int *xr, short *ix, side_info_t *si) 1441static int quantize_int(int *xr, short *ix, side_info_t *si)
1442{ 1442{
1443 unsigned int i, idx, s, frac_pow[] = { 0x10000, 0xd745, 0xb505, 0x9838 }; 1443 unsigned int i, idx, s, frac_pow[] = { 0x10000, 0xd745, 0xb505, 0x9838 };
1444 1444
@@ -1470,7 +1470,7 @@ int quantize_int(int *xr, short *ix, side_info_t *si)
1470/*************************************************************************/ 1470/*************************************************************************/
1471/* subdivides the bigvalue region which will use separate Huffman tables */ 1471/* subdivides the bigvalue region which will use separate Huffman tables */
1472/*************************************************************************/ 1472/*************************************************************************/
1473void subdivide(side_info_t *si) 1473static void subdivide(side_info_t *si)
1474{ 1474{
1475 int scfb, count0, count1; 1475 int scfb, count0, count1;
1476 1476
@@ -1498,7 +1498,7 @@ void subdivide(side_info_t *si)
1498/*******************************************************************/ 1498/*******************************************************************/
1499/* Count the number of bits necessary to code the bigvalues region */ 1499/* Count the number of bits necessary to code the bigvalues region */
1500/*******************************************************************/ 1500/*******************************************************************/
1501int bigv_bitcount(short *ix, side_info_t *gi) 1501static int bigv_bitcount(short *ix, side_info_t *gi)
1502{ 1502{
1503 int b1=0, b2=0, b3=0; 1503 int b1=0, b2=0, b3=0;
1504 1504
@@ -1519,7 +1519,7 @@ int bigv_bitcount(short *ix, side_info_t *gi)
1519 return b1+b2+b3; 1519 return b1+b2+b3;
1520} 1520}
1521 1521
1522int quantize_and_count_bits(int *xr, short *ix, side_info_t *si) 1522static int quantize_and_count_bits(int *xr, short *ix, side_info_t *si)
1523{ 1523{
1524 int bits = 10000; 1524 int bits = 10000;
1525 1525
@@ -1536,7 +1536,7 @@ int quantize_and_count_bits(int *xr, short *ix, side_info_t *si)
1536/************************************************************************/ 1536/************************************************************************/
1537/* The code selects the best quantStep for a particular set of scalefacs*/ 1537/* The code selects the best quantStep for a particular set of scalefacs*/
1538/************************************************************************/ 1538/************************************************************************/
1539int inner_loop(int *xr, int max_bits, side_info_t *si) 1539static int inner_loop(int *xr, int max_bits, side_info_t *si)
1540{ 1540{
1541 int bits; 1541 int bits;
1542 1542
@@ -1560,7 +1560,7 @@ int inner_loop(int *xr, int max_bits, side_info_t *si)
1560 return bits; 1560 return bits;
1561} 1561}
1562 1562
1563void iteration_loop(int *xr, side_info_t *si, int gr_cnt) 1563static void iteration_loop(int *xr, side_info_t *si, int gr_cnt)
1564{ 1564{
1565 int remain, tar_bits, max_bits = cfg.mean_bits; 1565 int remain, tar_bits, max_bits = cfg.mean_bits;
1566 1566
@@ -2072,7 +2072,7 @@ static int find_samplerate_index(uint16_t freq, int *mp3_type)
2072 return 0; 2072 return 0;
2073} 2073}
2074 2074
2075void init_mp3_encoder_engine(bool stereo, int bitrate, uint16_t sample_rate) 2075static void init_mp3_encoder_engine(bool stereo, int bitrate, uint16_t sample_rate)
2076{ 2076{
2077 uint32_t avg_byte_per_frame; 2077 uint32_t avg_byte_per_frame;
2078 2078
@@ -2130,7 +2130,7 @@ void init_mp3_encoder_engine(bool stereo, int bitrate, uint16_t sample_rate)
2130 : (cfg.channels == 1 ? 72 : 136)); 2130 : (cfg.channels == 1 ? 72 : 136));
2131} 2131}
2132 2132
2133void set_scale_facs(int *mdct_freq) 2133static void set_scale_facs(int *mdct_freq)
2134{ 2134{
2135 unsigned int i, is, ie, k, s; 2135 unsigned int i, is, ie, k, s;
2136 int max_freq_val, avrg_freq_val; 2136 int max_freq_val, avrg_freq_val;
@@ -2163,7 +2163,7 @@ void set_scale_facs(int *mdct_freq)
2163 } 2163 }
2164} 2164}
2165 2165
2166void compress(void) 2166static void compress(void)
2167{ 2167{
2168 int i, gr, gr_cnt; 2168 int i, gr, gr_cnt;
2169 uint32_t max; 2169 uint32_t max;
@@ -2369,7 +2369,7 @@ void compress(void)
2369int num_file; 2369int num_file;
2370char mp3_name[80]; 2370char mp3_name[80];
2371 2371
2372void get_mp3_filename(const char *wav_name) 2372static void get_mp3_filename(const char *wav_name)
2373{ 2373{
2374 rb->strlcpy(mp3_name, wav_name, sizeof(mp3_name)); 2374 rb->strlcpy(mp3_name, wav_name, sizeof(mp3_name));
2375 rb->strlcpy(mp3_name + rb->strlen(mp3_name) - 4, ".mp3", 5); 2375 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 {
43}; 43};
44struct file_format *list = NULL; 44struct file_format *list = NULL;
45 45
46void update_screen(bool clear) 46static void update_screen(bool clear)
47{ 47{
48 char buf[15]; 48 char buf[15];
49 int i; 49 int i;
@@ -58,7 +58,7 @@ void update_screen(bool clear)
58 } 58 }
59} 59}
60 60
61void traversedir(char* location, char* name) 61static void traversedir(char* location, char* name)
62{ 62{
63 struct dirent *entry; 63 struct dirent *entry;
64 DIR* dir; 64 DIR* dir;
@@ -126,7 +126,7 @@ void traversedir(char* location, char* name)
126 } 126 }
127} 127}
128 128
129bool custom_dir(void) 129static bool custom_dir(void)
130{ 130{
131 DIR* dir_check; 131 DIR* dir_check;
132 char *starts, line[MAX_PATH], formatted_line[MAX_PATH]; 132 char *starts, line[MAX_PATH], formatted_line[MAX_PATH];
@@ -212,7 +212,7 @@ bool custom_dir(void)
212 return true; 212 return true;
213} 213}
214 214
215void generate(void) 215static void generate(void)
216{ 216{
217 dirs_count = 0; 217 dirs_count = 0;
218 cancel = false; 218 cancel = false;
@@ -245,7 +245,7 @@ static const char* list_get_name_cb(int selected_item, void* data,
245 return buf; 245 return buf;
246} 246}
247 247
248int load_list(void) 248static int load_list(void)
249{ 249{
250 int myfd = rb->open(RFA_FILE,O_RDONLY); 250 int myfd = rb->open(RFA_FILE,O_RDONLY);
251 if (myfd < 0) 251 if (myfd < 0)
@@ -263,7 +263,7 @@ int load_list(void)
263 return 0; 263 return 0;
264} 264}
265 265
266int save_list(void) 266static int save_list(void)
267{ 267{
268 int myfd = rb->creat(RFA_FILE, 0666); 268 int myfd = rb->creat(RFA_FILE, 0666);
269 if (myfd < 0) 269 if (myfd < 0)
@@ -288,7 +288,7 @@ int save_list(void)
288 return 1; 288 return 1;
289} 289}
290 290
291int edit_list(void) 291static int edit_list(void)
292{ 292{
293 struct gui_synclist lists; 293 struct gui_synclist lists;
294 bool exit = false; 294 bool exit = false;
@@ -373,7 +373,7 @@ int edit_list(void)
373 return ret; 373 return ret;
374} 374}
375 375
376int export_list_to_file_text(void) 376static int export_list_to_file_text(void)
377{ 377{
378 int i = 0; 378 int i = 0;
379 /* load the dat file if not already done */ 379 /* load the dat file if not already done */
@@ -412,7 +412,7 @@ int export_list_to_file_text(void)
412 return 1; 412 return 1;
413} 413}
414 414
415int import_list_from_file_text(void) 415static int import_list_from_file_text(void)
416{ 416{
417 char line[MAX_PATH]; 417 char line[MAX_PATH];
418 418
@@ -465,7 +465,7 @@ int import_list_from_file_text(void)
465 return list->count; 465 return list->count;
466} 466}
467 467
468int start_shuffled_play(void) 468static int start_shuffled_play(void)
469{ 469{
470 int *order; 470 int *order;
471 size_t max_shuffle_size; 471 size_t max_shuffle_size;
@@ -539,7 +539,7 @@ int start_shuffled_play(void)
539 return 1; 539 return 1;
540} 540}
541 541
542enum plugin_status main_menu(void) 542static enum plugin_status main_menu(void)
543{ 543{
544 bool exit = false; 544 bool exit = false;
545 MENUITEM_STRINGLIST(menu, "Main Menu", NULL, 545 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)
75 return Icon_NOICON; 75 return Icon_NOICON;
76} 76}
77 77
78bool save_changes(void) 78static bool save_changes(void)
79{ 79{
80 int fd; 80 int fd;
81 int i; 81 int i;
@@ -123,7 +123,7 @@ bool save_changes(void)
123 return true; 123 return true;
124} 124}
125 125
126void create_view(struct gui_synclist *lists) 126static void create_view(struct gui_synclist *lists)
127{ 127{
128 unsigned int cnt = 0; 128 unsigned int cnt = 0;
129 int i, j; 129 int i, j;
@@ -168,7 +168,7 @@ void create_view(struct gui_synclist *lists)
168 } 168 }
169} 169}
170 170
171bool toggle(int selected_item) 171static bool toggle(int selected_item)
172{ 172{
173 if (items_list[view_id_list[selected_item]].flag == FL_CATEGORY) 173 if (items_list[view_id_list[selected_item]].flag == FL_CATEGORY)
174 return false; 174 return false;
@@ -179,7 +179,7 @@ bool toggle(int selected_item)
179 return true; 179 return true;
180} 180}
181 181
182void update_category_string(void) 182static void update_category_string(void)
183{ 183{
184 if (show_categories) 184 if (show_categories)
185 rb->strcpy(category_string,"Hide categories"); 185 rb->strcpy(category_string,"Hide categories");
@@ -187,7 +187,7 @@ void update_category_string(void)
187 rb->strcpy(category_string,"Show categories"); 187 rb->strcpy(category_string,"Show categories");
188} 188}
189 189
190enum plugin_status load_file(void) 190static enum plugin_status load_file(void)
191{ 191{
192 int fd; 192 int fd;
193 static char temp_line[DESC_SIZE]; 193 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];
415#define LEVELS_FILE PLUGIN_GAMES_DIR "/snake2.levels" 415#define LEVELS_FILE PLUGIN_GAMES_DIR "/snake2.levels"
416#define SCORE_FILE PLUGIN_GAMES_DATA_DIR "/snake2.score" 416#define SCORE_FILE PLUGIN_GAMES_DATA_DIR "/snake2.score"
417 417
418int load_all_levels(void) 418static int load_all_levels(void)
419{ 419{
420 int linecnt = 0; 420 int linecnt = 0;
421 int fd; 421 int fd;
@@ -465,7 +465,7 @@ int load_all_levels(void)
465** Completely clear the board of walls and/or snake 465** Completely clear the board of walls and/or snake
466*/ 466*/
467 467
468void clear_board( void) 468static void clear_board( void)
469{ 469{
470 int x,y; 470 int x,y;
471 471
@@ -478,7 +478,7 @@ void clear_board( void)
478 } 478 }
479} 479}
480 480
481int load_level( int level_number ) 481static int load_level( int level_number )
482{ 482{
483 int x,y; 483 int x,y;
484 clear_board(); 484 clear_board();
@@ -510,7 +510,7 @@ int load_level( int level_number )
510** in the direction buffer. If there is something in the 510** in the direction buffer. If there is something in the
511** next part of the buffer then that is moved to the first place 511** next part of the buffer then that is moved to the first place
512*/ 512*/
513void get_direction( void ) 513static void get_direction( void )
514{ 514{
515 /*if 1st place is empty*/ 515 /*if 1st place is empty*/
516 if(ardirectionbuffer[0] != -1) 516 if(ardirectionbuffer[0] != -1)
@@ -532,7 +532,7 @@ void get_direction( void )
532/* 532/*
533** Sets the direction 533** Sets the direction
534*/ 534*/
535void set_direction(int newdir) 535static void set_direction(int newdir)
536{ 536{
537 if(ardirectionbuffer[0] != newdir) 537 if(ardirectionbuffer[0] != newdir)
538 { 538 {
@@ -552,7 +552,7 @@ void set_direction(int newdir)
552 } 552 }
553} 553}
554 554
555void new_level(int level) 555static void new_level(int level)
556{ 556{
557 load_level(level); 557 load_level(level);
558 558
@@ -573,7 +573,7 @@ void new_level(int level)
573 num_apples_to_got=0; 573 num_apples_to_got=0;
574} 574}
575 575
576void init_snake(void) 576static void init_snake(void)
577{ 577{
578 num_apples_to_get=1; 578 num_apples_to_get=1;
579 if(game_type == 1) 579 if(game_type == 1)
@@ -583,7 +583,7 @@ void init_snake(void)
583} 583}
584 584
585#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) 585#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128)
586void draw_frame_bitmap(int header_type) 586static void draw_frame_bitmap(int header_type)
587{ 587{
588 rb->lcd_bitmap(header_type==1? snake2_header1: snake2_header2, 0, 0, 588 rb->lcd_bitmap(header_type==1? snake2_header1: snake2_header2, 0, 0,
589 BMPWIDTH_snake2_header, BMPHEIGHT_snake2_header); 589 BMPWIDTH_snake2_header, BMPHEIGHT_snake2_header);
@@ -602,7 +602,7 @@ void draw_frame_bitmap(int header_type)
602** Draws the apple. If it doesn't exist then 602** Draws the apple. If it doesn't exist then
603** a new one get's created. 603** a new one get's created.
604*/ 604*/
605void draw_apple_bit(int x, int y) 605static void draw_apple_bit(int x, int y)
606{ 606{
607 rb->lcd_fillrect((CENTER_X+x*MULTIPLIER)+1, CENTER_Y+y*MULTIPLIER, 607 rb->lcd_fillrect((CENTER_X+x*MULTIPLIER)+1, CENTER_Y+y*MULTIPLIER,
608 MODIFIER_2, MODIFIER_1); 608 MODIFIER_2, MODIFIER_1);
@@ -610,7 +610,7 @@ void draw_apple_bit(int x, int y)
610 MODIFIER_1, MODIFIER_2); 610 MODIFIER_1, MODIFIER_2);
611} 611}
612 612
613void draw_apple( void ) 613static void draw_apple( void )
614{ 614{
615 int x,y; 615 int x,y;
616 616
@@ -646,7 +646,7 @@ void draw_apple( void )
646 * x x * 646 * x x *
647 * x x * 647 * x x *
648*/ 648*/
649void draw_vertical_bit(int x, int y) 649static void draw_vertical_bit(int x, int y)
650{ 650{
651 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER, 651 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER,
652 MODIFIER_2, MODIFIER_1); 652 MODIFIER_2, MODIFIER_1);
@@ -658,7 +658,7 @@ void draw_vertical_bit(int x, int y)
658 X X X X 658 X X X X
659 * * * * 659 * * * *
660*/ 660*/
661void draw_horizontal_bit(int x, int y) 661static void draw_horizontal_bit(int x, int y)
662{ 662{
663 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER, CENTER_Y+y*MULTIPLIER+1, 663 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER, CENTER_Y+y*MULTIPLIER+1,
664 MODIFIER_1, MODIFIER_2); 664 MODIFIER_1, MODIFIER_2);
@@ -670,7 +670,7 @@ void draw_horizontal_bit(int x, int y)
670 * X X X 670 * X X X
671 * X X * 671 * X X *
672*/ 672*/
673void draw_n_to_e_bit(int x, int y) 673static void draw_n_to_e_bit(int x, int y)
674{ 674{
675 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER+2, 675 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER+2,
676 MODIFIER_2, MODIFIER_2); 676 MODIFIER_2, MODIFIER_2);
@@ -684,7 +684,7 @@ void draw_n_to_e_bit(int x, int y)
684 * X X X 684 * X X X
685 * X X * 685 * X X *
686*/ 686*/
687void draw_w_to_s_bit(int x, int y) 687static void draw_w_to_s_bit(int x, int y)
688{ 688{
689 draw_n_to_e_bit(x,y); 689 draw_n_to_e_bit(x,y);
690} 690}
@@ -695,7 +695,7 @@ void draw_w_to_s_bit(int x, int y)
695 X X X * 695 X X X *
696 * X X * 696 * X X *
697*/ 697*/
698void draw_n_to_w_bit(int x, int y) 698static void draw_n_to_w_bit(int x, int y)
699{ 699{
700 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER, CENTER_Y+y*MULTIPLIER+1, 700 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER, CENTER_Y+y*MULTIPLIER+1,
701 MODIFIER_2, MODIFIER_2); 701 MODIFIER_2, MODIFIER_2);
@@ -709,7 +709,7 @@ void draw_n_to_w_bit(int x, int y)
709 X X X * 709 X X X *
710 * X X * 710 * X X *
711*/ 711*/
712void draw_e_to_s_bit(int x, int y) 712static void draw_e_to_s_bit(int x, int y)
713{ 713{
714 draw_n_to_w_bit(x, y); 714 draw_n_to_w_bit(x, y);
715} 715}
@@ -720,7 +720,7 @@ void draw_e_to_s_bit(int x, int y)
720 * * X X 720 * * X X
721 * * * * 721 * * * *
722*/ 722*/
723void draw_s_to_e_bit(int x, int y) 723static void draw_s_to_e_bit(int x, int y)
724{ 724{
725 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER, 725 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER,
726 MODIFIER_2, MODIFIER_2); 726 MODIFIER_2, MODIFIER_2);
@@ -734,7 +734,7 @@ void draw_s_to_e_bit(int x, int y)
734 * * X X 734 * * X X
735 * * * * 735 * * * *
736*/ 736*/
737void draw_w_to_n_bit(int x, int y) 737static void draw_w_to_n_bit(int x, int y)
738{ 738{
739 draw_s_to_e_bit(x,y); 739 draw_s_to_e_bit(x,y);
740} 740}
@@ -745,7 +745,7 @@ void draw_w_to_n_bit(int x, int y)
745 X X * * 745 X X * *
746 * * * * 746 * * * *
747*/ 747*/
748void draw_e_to_n_bit(int x, int y) 748static void draw_e_to_n_bit(int x, int y)
749{ 749{
750 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER, 750 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1, CENTER_Y+y*MULTIPLIER,
751 MODIFIER_2, MODIFIER_2); 751 MODIFIER_2, MODIFIER_2);
@@ -759,21 +759,22 @@ void draw_e_to_n_bit(int x, int y)
759 X X * * 759 X X * *
760 * * * * 760 * * * *
761*/ 761*/
762void draw_s_to_w_bit(int x, int y) 762static void draw_s_to_w_bit(int x, int y)
763{ 763{
764 draw_e_to_n_bit(x, y); 764 draw_e_to_n_bit(x, y);
765} 765}
766 766
767void draw_head_bit(int x, int y) 767static void draw_head_bit(int x, int y)
768{ 768{
769 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER, CENTER_Y+y*MULTIPLIER, 769 rb->lcd_fillrect(CENTER_X+x*MULTIPLIER, CENTER_Y+y*MULTIPLIER,
770 MODIFIER_1, MODIFIER_1); 770 MODIFIER_1, MODIFIER_1);
771} 771}
772 772
773#if 0 /* unused */
773/* 774/*
774** Draws a wall/obsticals 775** Draws a wall/obsticals
775*/ 776*/
776void draw_boundary ( void ) 777static void draw_boundary ( void )
777{ 778{
778 int x, y; 779 int x, y;
779 780
@@ -799,11 +800,12 @@ void draw_boundary ( void )
799 board[0][HEIGHT-1] = SOUTH_EAST; 800 board[0][HEIGHT-1] = SOUTH_EAST;
800 board[WIDTH-1][HEIGHT-1] = EAST_NORTH; 801 board[WIDTH-1][HEIGHT-1] = EAST_NORTH;
801} 802}
803#endif
802 804
803/* 805/*
804** Redraw the entire board 806** Redraw the entire board
805*/ 807*/
806void redraw (void) 808static void redraw (void)
807{ 809{
808 int x,y; 810 int x,y;
809 811
@@ -860,7 +862,7 @@ void redraw (void)
860** Draws the snake bit described by nCurrentBit at position x/y 862** Draws the snake bit described by nCurrentBit at position x/y
861** deciding whether it's a corner bit by examing the nPrevious bit 863** deciding whether it's a corner bit by examing the nPrevious bit
862*/ 864*/
863void draw_snake_bit(int currentbit, int previousbit, int x, int y) 865static void draw_snake_bit(int currentbit, int previousbit, int x, int y)
864{ 866{
865 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 867 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
866 draw_head_bit(x, y); 868 draw_head_bit(x, y);
@@ -942,7 +944,7 @@ void draw_snake_bit(int currentbit, int previousbit, int x, int y)
942 } 944 }
943} 945}
944 946
945void redraw_snake(void) 947static void redraw_snake(void)
946{ 948{
947 int x = tailx, y = taily; 949 int x = tailx, y = taily;
948 int olddir, newdir = board[x][y]; 950 int olddir, newdir = board[x][y];
@@ -989,7 +991,7 @@ void redraw_snake(void)
989/* 991/*
990** Death 'sequence' and end game stuff. 992** Death 'sequence' and end game stuff.
991*/ 993*/
992void die (void) 994static void die (void)
993{ 995{
994 int button; 996 int button;
995 bool done=false; 997 bool done=false;
@@ -1045,7 +1047,7 @@ void die (void)
1045** sets of the death sequence. What we want is it to only return a true/false 1047** sets of the death sequence. What we want is it to only return a true/false
1046** depending on whether a collision occured. 1048** depending on whether a collision occured.
1047*/ 1049*/
1048void collision ( int x, int y ) 1050static void collision ( int x, int y )
1049{ 1051{
1050 int bdeath=0; 1052 int bdeath=0;
1051 1053
@@ -1096,7 +1098,7 @@ void collision ( int x, int y )
1096 } 1098 }
1097} 1099}
1098 1100
1099void move( void ) 1101static void move( void )
1100{ 1102{
1101 int taildir; 1103 int taildir;
1102 /*this actually sets the dir variable.*/ 1104 /*this actually sets the dir variable.*/
@@ -1177,7 +1179,7 @@ void move( void )
1177 applecountdown--; 1179 applecountdown--;
1178} 1180}
1179 1181
1180void frame (void) 1182static void frame (void)
1181{ 1183{
1182 int olddir, noldx, noldy, temp; 1184 int olddir, noldx, noldy, temp;
1183 noldx = headx; 1185 noldx = headx;
@@ -1235,7 +1237,7 @@ void frame (void)
1235 rb->lcd_update(); 1237 rb->lcd_update();
1236} 1238}
1237 1239
1238void game_pause (void) 1240static void game_pause (void)
1239{ 1241{
1240 int button; 1242 int button;
1241 1243
@@ -1276,7 +1278,7 @@ void game_pause (void)
1276 } 1278 }
1277} 1279}
1278 1280
1279void game (void) 1281static void game (void)
1280{ 1282{
1281 int button; 1283 int button;
1282 1284
@@ -1365,7 +1367,7 @@ void game (void)
1365 1367
1366} 1368}
1367 1369
1368void select_maze(void) 1370static void select_maze(void)
1369{ 1371{
1370 int button; 1372 int button;
1371 1373
@@ -1440,7 +1442,7 @@ void select_maze(void)
1440 1442
1441} 1443}
1442 1444
1443void game_init(void) 1445static void game_init(void)
1444{ 1446{
1445 int selection = 0; 1447 int selection = 0;
1446 1448
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);
802enum { MENU_RESUME, MENU_SAVE_AND_QUIT, MENU_QUIT, MENU_USB }; 802enum { MENU_RESUME, MENU_SAVE_AND_QUIT, MENU_QUIT, MENU_USB };
803 803
804static bool _ingame; 804static bool _ingame;
805int solitaire_menu_cb(int action, const struct menu_item_ex *this_item) 805static int solitaire_menu_cb(int action, const struct menu_item_ex *this_item)
806{ 806{
807 int i = (intptr_t)this_item; 807 int i = (intptr_t)this_item;
808 if( action == ACTION_REQUEST_MENUITEM ) 808 if( action == ACTION_REQUEST_MENUITEM )
@@ -813,7 +813,7 @@ int solitaire_menu_cb(int action, const struct menu_item_ex *this_item)
813 return action; 813 return action;
814} 814}
815 815
816int solitaire_menu(bool in_game) 816static int solitaire_menu(bool in_game)
817{ 817{
818 int selected = 0; 818 int selected = 0;
819 int result = -1; 819 int result = -1;
@@ -907,7 +907,7 @@ int stacks[SUITS];
907 * Card handling routines 907 * Card handling routines
908 */ 908 */
909 909
910int next_random_card( card_t *deck ) 910static int next_random_card( card_t *deck )
911{ 911{
912 int i,r; 912 int i,r;
913 913
@@ -1012,7 +1012,7 @@ void solitaire_init( void )
1012} 1012}
1013 1013
1014/* find the column number in which 'card' can be found */ 1014/* find the column number in which 'card' can be found */
1015int find_card_col( int card ) 1015static int find_card_col( int card )
1016{ 1016{
1017 int i; 1017 int i;
1018 int c; 1018 int c;
@@ -1044,7 +1044,7 @@ int find_card_col( int card )
1044 1044
1045/* find the card preceding 'card' */ 1045/* find the card preceding 'card' */
1046/* if it doesn't exist, return NOT_A_CARD */ 1046/* if it doesn't exist, return NOT_A_CARD */
1047int find_prev_card( int card ){ 1047static int find_prev_card( int card ){
1048 int i; 1048 int i;
1049 1049
1050 for( i=0; i < NUM_CARDS; i++ ) 1050 for( i=0; i < NUM_CARDS; i++ )
@@ -1056,7 +1056,7 @@ int find_prev_card( int card ){
1056} 1056}
1057 1057
1058/* find the last card of a given column */ 1058/* find the last card of a given column */
1059int find_last_card( int col ) 1059static int find_last_card( int col )
1060{ 1060{
1061 int c; 1061 int c;
1062 1062
@@ -1085,7 +1085,7 @@ int find_last_card( int col )
1085 1085
1086enum move { MOVE_OK, MOVE_NOT_OK }; 1086enum move { MOVE_OK, MOVE_NOT_OK };
1087 1087
1088enum move move_card( int dest_col, int src_card ) 1088static enum move move_card( int dest_col, int src_card )
1089{ 1089{
1090 /* the column on which to take src_card */ 1090 /* the column on which to take src_card */
1091 int src_col; 1091 int src_col;
@@ -1238,7 +1238,7 @@ enum { SOLITAIRE_WIN, SOLITAIRE_SAVE_AND_QUIT, SOLITAIRE_QUIT, SOLITAIRE_USB };
1238#define BC_MYSPEED (6*BC_ACCEL) 1238#define BC_MYSPEED (6*BC_ACCEL)
1239#define BC_MXSPEED (6*LCD_HEIGHT/128) 1239#define BC_MXSPEED (6*LCD_HEIGHT/128)
1240 1240
1241int bouncing_cards( void ) 1241static int bouncing_cards( void )
1242{ 1242{
1243 int i, j, x, vx, y, fp_y, fp_vy, button; 1243 int i, j, x, vx, y, fp_y, fp_vy, button;
1244 1244
@@ -1299,7 +1299,7 @@ int bouncing_cards( void )
1299/** 1299/**
1300 * Game save/load routines 1300 * Game save/load routines
1301 */ 1301 */
1302void get_save_filename( char *buf ) 1302static void get_save_filename( char *buf )
1303{ 1303{
1304#ifdef APPLICATION 1304#ifdef APPLICATION
1305 rb->snprintf(buf, sizeof(buf), PLUGIN_DATA_DIR "/sol.save"); 1305 rb->snprintf(buf, sizeof(buf), PLUGIN_DATA_DIR "/sol.save");
@@ -1312,14 +1312,14 @@ void get_save_filename( char *buf )
1312#endif 1312#endif
1313} 1313}
1314 1314
1315int open_save_file( int flags ) 1315static int open_save_file( int flags )
1316{ 1316{
1317 char buf[MAX_PATH]; 1317 char buf[MAX_PATH];
1318 get_save_filename( buf ); 1318 get_save_filename( buf );
1319 return rb->open( buf, flags, 0666); 1319 return rb->open( buf, flags, 0666);
1320} 1320}
1321 1321
1322void delete_save_file( void ) 1322static void delete_save_file( void )
1323{ 1323{
1324 char buf[MAX_PATH]; 1324 char buf[MAX_PATH];
1325 get_save_filename( buf ); 1325 get_save_filename( buf );
@@ -1329,7 +1329,7 @@ void delete_save_file( void )
1329#ifdef write 1329#ifdef write
1330# undef write 1330# undef write
1331#endif 1331#endif
1332int save_write( int fd, const void *buf, size_t count, int *checksum ) 1332static int save_write( int fd, const void *buf, size_t count, int *checksum )
1333{ 1333{
1334 size_t i; 1334 size_t i;
1335 if( rb->write( fd, buf, count ) < (ssize_t)count ) 1335 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 )
1342#ifdef read 1342#ifdef read
1343# undef read 1343# undef read
1344#endif 1344#endif
1345int save_read( int fd, void *buf, size_t count, int *checksum ) 1345static int save_read( int fd, void *buf, size_t count, int *checksum )
1346{ 1346{
1347 size_t i; 1347 size_t i;
1348 if( rb->read( fd, buf, count ) < (ssize_t)count ) 1348 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 )
1352 return 0; 1352 return 0;
1353} 1353}
1354 1354
1355int save_game( void ) 1355static int save_game( void )
1356{ 1356{
1357 int fd = open_save_file( O_CREAT|O_WRONLY|O_TRUNC ); 1357 int fd = open_save_file( O_CREAT|O_WRONLY|O_TRUNC );
1358 int checksum = 42; 1358 int checksum = 42;
@@ -1378,7 +1378,7 @@ int save_game( void )
1378 return 0; 1378 return 0;
1379} 1379}
1380 1380
1381int load_game( void ) 1381static int load_game( void )
1382{ 1382{
1383 int checksum, retval; 1383 int checksum, retval;
1384 1384
@@ -1422,7 +1422,7 @@ int load_game( void )
1422 * game will resume. 1422 * game will resume.
1423 */ 1423 */
1424 1424
1425int solitaire( int skipmenu ) 1425static int solitaire( int skipmenu )
1426{ 1426{
1427 1427
1428 int i,j; 1428 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)
81 rb->qsort(pointers, num_entries, sizeof(char *), compare); 81 rb->qsort(pointers, num_entries, sizeof(char *), compare);
82} 82}
83 83
84int read_buffer(int offset) 84static int read_buffer(int offset)
85{ 85{
86 int fd; 86 int fd;
87 char *buf_ptr; 87 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;
115#endif 115#endif
116 116
117/* we don't have yet a filetype attribute for image files */ 117/* we don't have yet a filetype attribute for image files */
118const char *image_exts[] = {"bmp","jpg","jpe","jpeg","png","ppm"}; 118static const char *image_exts[] = {"bmp","jpg","jpe","jpeg","png","ppm"};
119 119
120/* neither for video ones */ 120/* neither for video ones */
121const char *video_exts[] = {"mpg","mpeg","mpv","m2v"}; 121static const char *video_exts[] = {"mpg","mpeg","mpv","m2v"};
122 122
123void prn(const char *str, int y) 123static void prn(const char *str, int y)
124{ 124{
125 rb->lcd_puts(0,y,str); 125 rb->lcd_puts(0,y,str);
126#ifdef HAVE_REMOTE_LCD 126#ifdef HAVE_REMOTE_LCD
@@ -128,7 +128,7 @@ void prn(const char *str, int y)
128#endif 128#endif
129} 129}
130 130
131void update_screen(void) 131static void update_screen(void)
132{ 132{
133 char buf[32]; 133 char buf[32];
134 134
@@ -165,7 +165,7 @@ void update_screen(void)
165#endif 165#endif
166} 166}
167 167
168void traversedir(char* location, char* name) 168static void traversedir(char* location, char* name)
169{ 169{
170 int button; 170 int button;
171 struct dirent *entry; 171 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)
330/* 330/*
331 * Load saved stopwatch state, if exists. 331 * Load saved stopwatch state, if exists.
332 */ 332 */
333void load_stopwatch(void) 333static void load_stopwatch(void)
334{ 334{
335 int fd; 335 int fd;
336 336
@@ -370,7 +370,7 @@ void load_stopwatch(void)
370/* 370/*
371 * Save stopwatch state. 371 * Save stopwatch state.
372 */ 372 */
373void save_stopwatch(void) 373static void save_stopwatch(void)
374{ 374{
375 int fd; 375 int fd;
376 376