summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/chessbox/chessbox.c24
-rw-r--r--apps/plugins/chessbox/chessbox_pgn.c18
-rw-r--r--apps/plugins/clock/clock.c4
-rw-r--r--apps/plugins/clock/clock_counter.c2
-rw-r--r--apps/plugins/clock/clock_draw.c10
-rw-r--r--apps/plugins/clock/clock_draw_analog.c22
-rw-r--r--apps/plugins/clock/clock_draw_binary.c2
-rw-r--r--apps/plugins/clock/clock_menu.c11
-rw-r--r--apps/plugins/clock/clock_settings.c14
9 files changed, 54 insertions, 53 deletions
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c
index 6437c8d4fd..3bd9593e3a 100644
--- a/apps/plugins/chessbox/chessbox.c
+++ b/apps/plugins/chessbox/chessbox.c
@@ -94,7 +94,7 @@ const char *level_string[] = { "Level 1: 60 moves / 5 min" ,
94int wt_command = COMMAND_NOP; 94int wt_command = COMMAND_NOP;
95 95
96/* ---- Get the board column and row (e2 f.e.) for a physical x y ---- */ 96/* ---- Get the board column and row (e2 f.e.) for a physical x y ---- */
97void xy2cr ( short x, short y, short *c, short *r ) { 97static void xy2cr ( short x, short y, short *c, short *r ) {
98 if (computer == black ) { 98 if (computer == black ) {
99 *c = x ; 99 *c = x ;
100 *r = y ; 100 *r = y ;
@@ -105,7 +105,7 @@ void xy2cr ( short x, short y, short *c, short *r ) {
105} 105}
106 106
107/* ---- get physical x y for a board column and row (e2 f.e.) ---- */ 107/* ---- get physical x y for a board column and row (e2 f.e.) ---- */
108void cr2xy ( short c, short r, short *x, short *y ) { 108static void cr2xy ( short c, short r, short *x, short *y ) {
109 if ( computer == black ) { 109 if ( computer == black ) {
110 *x = c ; 110 *x = c ;
111 *y = r ; 111 *y = r ;
@@ -174,7 +174,7 @@ static void cb_drawboard (void) {
174} 174}
175 175
176/* ---- Switch mark on board ---- */ 176/* ---- Switch mark on board ---- */
177void cb_switch ( short x , short y ) { 177static void cb_switch ( short x , short y ) {
178 rb->lcd_set_drawmode ( DRMODE_COMPLEMENT ); 178 rb->lcd_set_drawmode ( DRMODE_COMPLEMENT );
179 rb->lcd_drawrect ( XOFS + x*TILE_WIDTH + 1 , 179 rb->lcd_drawrect ( XOFS + x*TILE_WIDTH + 1 ,
180 YOFS + ( 7 - y )*TILE_HEIGHT +1 , 180 YOFS + ( 7 - y )*TILE_HEIGHT +1 ,
@@ -184,7 +184,7 @@ void cb_switch ( short x , short y ) {
184} 184}
185 185
186/* ---- callback for capturing interaction while thinking ---- */ 186/* ---- callback for capturing interaction while thinking ---- */
187void cb_wt_callback ( void ) { 187static void cb_wt_callback ( void ) {
188 int button = BUTTON_NONE; 188 int button = BUTTON_NONE;
189 189
190 wt_command = COMMAND_NOP; 190 wt_command = COMMAND_NOP;
@@ -208,7 +208,7 @@ void cb_wt_callback ( void ) {
208} 208}
209 209
210/* ---- set playing parameters depending on level ---- */ 210/* ---- set playing parameters depending on level ---- */
211void cb_setlevel ( int lev ) { 211static void cb_setlevel ( int lev ) {
212 Level = (lev > 7) ? 7 : ( (lev < 1) ? 1 : lev ) ; 212 Level = (lev > 7) ? 7 : ( (lev < 1) ? 1 : lev ) ;
213 switch (Level) { 213 switch (Level) {
214 case 1 : 214 case 1 :
@@ -257,7 +257,7 @@ void cb_setlevel ( int lev ) {
257} 257}
258 258
259/* ---- increase playing level ---- */ 259/* ---- increase playing level ---- */
260void cb_levelup ( void ) { 260static void cb_levelup ( void ) {
261 if ( Level == 7 ) 261 if ( Level == 7 )
262 cb_setlevel ( 1 ); 262 cb_setlevel ( 1 );
263 else 263 else
@@ -266,7 +266,7 @@ void cb_levelup ( void ) {
266}; 266};
267 267
268/* ---- Save current position ---- */ 268/* ---- Save current position ---- */
269void cb_saveposition ( void ) { 269static void cb_saveposition ( void ) {
270 int fd; 270 int fd;
271 short sq,i,c; 271 short sq,i,c;
272 unsigned short temp; 272 unsigned short temp;
@@ -319,7 +319,7 @@ void cb_saveposition ( void ) {
319} 319}
320 320
321/* ---- Restore saved position ---- */ 321/* ---- Restore saved position ---- */
322void cb_restoreposition ( void ) { 322static void cb_restoreposition ( void ) {
323 int fd; 323 int fd;
324 short sq; 324 short sq;
325 unsigned short m; 325 unsigned short m;
@@ -419,7 +419,7 @@ static int cb_menu_viewer(void)
419} 419}
420 420
421/* ---- get a command in game mode ---- */ 421/* ---- get a command in game mode ---- */
422struct cb_command cb_get_viewer_command (void) { 422static struct cb_command cb_get_viewer_command (void) {
423 int button; 423 int button;
424 struct cb_command result = { 0, {0,0,0,0,0}, 0 }; 424 struct cb_command result = { 0, {0,0,0,0,0}, 0 };
425 425
@@ -447,7 +447,7 @@ struct cb_command cb_get_viewer_command (void) {
447} 447}
448 448
449/* ---- viewer main loop ---- */ 449/* ---- viewer main loop ---- */
450void cb_start_viewer(char* filename){ 450static void cb_start_viewer(char* filename){
451 struct pgn_game_node *first_game, *selected_game; 451 struct pgn_game_node *first_game, *selected_game;
452 struct pgn_ply_node *curr_ply; 452 struct pgn_ply_node *curr_ply;
453 bool exit_game = false; 453 bool exit_game = false;
@@ -638,7 +638,7 @@ static int cb_menu(void)
638} 638}
639 639
640/* ---- get a command in game mode ---- */ 640/* ---- get a command in game mode ---- */
641struct cb_command cb_getcommand (void) { 641static struct cb_command cb_getcommand (void) {
642 static short x = 4 , y = 3 ; 642 static short x = 4 , y = 3 ;
643 short c , r , l; 643 short c , r , l;
644 int button; 644 int button;
@@ -773,7 +773,7 @@ struct cb_command cb_getcommand (void) {
773} 773}
774 774
775/* ---- game main loop ---- */ 775/* ---- game main loop ---- */
776void cb_play_game(void) { 776static void cb_play_game(void) {
777 struct cb_command command; 777 struct cb_command command;
778 struct pgn_game_node *game; 778 struct pgn_game_node *game;
779 char move_buffer[20]; 779 char move_buffer[20];
diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c
index 846ea41847..8b2cb1b2f2 100644
--- a/apps/plugins/chessbox/chessbox_pgn.c
+++ b/apps/plugins/chessbox/chessbox_pgn.c
@@ -37,7 +37,7 @@ size_t bufleft;
37/* simple function to "allocate" memory in pluginbuffer. 37/* simple function to "allocate" memory in pluginbuffer.
38 * (borrowed from dict.c) 38 * (borrowed from dict.c)
39 */ 39 */
40void *pl_malloc(size_t size) 40static void *pl_malloc(size_t size)
41{ 41{
42 void *ptr; 42 void *ptr;
43 ptr = bufptr; 43 ptr = bufptr;
@@ -55,12 +55,12 @@ void *pl_malloc(size_t size)
55} 55}
56 56
57/* init function for pl_malloc() */ 57/* init function for pl_malloc() */
58void pl_malloc_init(void) 58static void pl_malloc_init(void)
59{ 59{
60 bufptr = rb->plugin_get_buffer(&bufleft); 60 bufptr = rb->plugin_get_buffer(&bufleft);
61} 61}
62 62
63void process_tag(struct pgn_game_node* game, char* buffer){ 63static void process_tag(struct pgn_game_node* game, char* buffer){
64 char tag_type[20]; 64 char tag_type[20];
65 char tag_value[255]; 65 char tag_value[255];
66 short pos=0, pos2=0; 66 short pos=0, pos2=0;
@@ -95,7 +95,7 @@ void process_tag(struct pgn_game_node* game, char* buffer){
95 } 95 }
96} 96}
97 97
98unsigned short get_next_token(const char* line_buffer, unsigned short initial_pos, 98static unsigned short get_next_token(const char* line_buffer, unsigned short initial_pos,
99 char* token_buffer){ 99 char* token_buffer){
100 unsigned short pos, token_pos=0; 100 unsigned short pos, token_pos=0;
101 for (pos = initial_pos;line_buffer[pos] == ' ' || line_buffer[pos] == '.';pos++); 101 for (pos = initial_pos;line_buffer[pos] == ' ' || line_buffer[pos] == '.';pos++);
@@ -112,7 +112,7 @@ unsigned short get_next_token(const char* line_buffer, unsigned short initial_po
112 return pos; 112 return pos;
113} 113}
114 114
115unsigned short piece_from_pgn(char pgn_piece){ 115static unsigned short piece_from_pgn(char pgn_piece){
116 switch (pgn_piece){ 116 switch (pgn_piece){
117 case 'R': 117 case 'R':
118 return rook; 118 return rook;
@@ -128,7 +128,7 @@ unsigned short piece_from_pgn(char pgn_piece){
128 return no_piece; 128 return no_piece;
129} 129}
130 130
131char pgn_from_piece(unsigned short piece, unsigned short color){ 131static char pgn_from_piece(unsigned short piece, unsigned short color){
132 char pgn_piece = ' '; 132 char pgn_piece = ' ';
133 switch (piece){ 133 switch (piece){
134 case pawn: 134 case pawn:
@@ -159,7 +159,7 @@ char pgn_from_piece(unsigned short piece, unsigned short color){
159 return pgn_piece; 159 return pgn_piece;
160} 160}
161 161
162void pgn_to_coords(struct pgn_ply_node* ply){ 162static void pgn_to_coords(struct pgn_ply_node* ply){
163 unsigned short str_length = rb->strlen(ply->pgn_text); 163 unsigned short str_length = rb->strlen(ply->pgn_text);
164 char str[10]; 164 char str[10];
165 rb->strcpy(str,ply->pgn_text); 165 rb->strcpy(str,ply->pgn_text);
@@ -354,7 +354,7 @@ void pgn_to_coords(struct pgn_ply_node* ply){
354 color[locn[ply->row_from][ply->column_from]] = neutral; 354 color[locn[ply->row_from][ply->column_from]] = neutral;
355} 355}
356 356
357void coords_to_pgn(struct pgn_ply_node* ply){ 357static void coords_to_pgn(struct pgn_ply_node* ply){
358 int pos = 0,i,j; 358 int pos = 0,i,j;
359 unsigned short moving_piece = board[locn[ply->row_from][ply->column_from]]; 359 unsigned short moving_piece = board[locn[ply->row_from][ply->column_from]];
360 char unambiguous_position; 360 char unambiguous_position;
@@ -545,7 +545,7 @@ static const char* get_game_text(int selected_item, void *data,
545 return buffer; 545 return buffer;
546} 546}
547 547
548void write_pgn_token(int fhandler, char *buffer, size_t *line_length){ 548static void write_pgn_token(int fhandler, char *buffer, size_t *line_length){
549 if (*line_length + rb->strlen(buffer) + 1 > 80){ 549 if (*line_length + rb->strlen(buffer) + 1 > 80){
550 rb->fdprintf(fhandler,"\n"); 550 rb->fdprintf(fhandler,"\n");
551 *line_length = 0; 551 *line_length = 0;
diff --git a/apps/plugins/clock/clock.c b/apps/plugins/clock/clock.c
index 641a1e7ad3..d287c75598 100644
--- a/apps/plugins/clock/clock.c
+++ b/apps/plugins/clock/clock.c
@@ -57,7 +57,7 @@ const struct button_mapping* plugin_contexts[]={
57/************************** 57/**************************
58 * Cleanup on plugin return 58 * Cleanup on plugin return
59 *************************/ 59 *************************/
60void cleanup(void) 60static void cleanup(void)
61{ 61{
62 clock_draw_restore_colors(); 62 clock_draw_restore_colors();
63 if(clock_settings.general.save_settings == 1) 63 if(clock_settings.general.save_settings == 1)
@@ -68,7 +68,7 @@ void cleanup(void)
68} 68}
69 69
70/* puts the current time into the time struct */ 70/* puts the current time into the time struct */
71void clock_update_time( struct time* time){ 71static void clock_update_time( struct time* time){
72 struct tm* current_time = rb->get_time(); 72 struct tm* current_time = rb->get_time();
73 time->hour = current_time->tm_hour; 73 time->hour = current_time->tm_hour;
74 time->minute = current_time->tm_min; 74 time->minute = current_time->tm_min;
diff --git a/apps/plugins/clock/clock_counter.c b/apps/plugins/clock/clock_counter.c
index 7137eeaf38..ce29e4ce91 100644
--- a/apps/plugins/clock/clock_counter.c
+++ b/apps/plugins/clock/clock_counter.c
@@ -7,7 +7,7 @@ void counter_init(struct counter* counter){
7 counter->paused=true; 7 counter->paused=true;
8} 8}
9 9
10int counter_get_ticks_since_last_pause(struct counter* counter){ 10static int counter_get_ticks_since_last_pause(struct counter* counter){
11 if(!counter->paused) 11 if(!counter->paused)
12 return(*rb->current_tick - counter->ticks_at_last_unpause); 12 return(*rb->current_tick - counter->ticks_at_last_unpause);
13 return(0); 13 return(0);
diff --git a/apps/plugins/clock/clock_draw.c b/apps/plugins/clock/clock_draw.c
index 411a7f1545..ce5006d46d 100644
--- a/apps/plugins/clock/clock_draw.c
+++ b/apps/plugins/clock/clock_draw.c
@@ -26,7 +26,7 @@
26#include "clock_draw_binary.h" 26#include "clock_draw_binary.h"
27#include "clock_settings.h" 27#include "clock_settings.h"
28 28
29void black_background(struct screen* display){ 29static void black_background(struct screen* display){
30#if (LCD_DEPTH > 1) || (defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH > 1)) 30#if (LCD_DEPTH > 1) || (defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH > 1))
31 if(display->depth>1){ 31 if(display->depth>1){
32 display->set_background(LCD_BLACK); 32 display->set_background(LCD_BLACK);
@@ -39,7 +39,7 @@ void black_background(struct screen* display){
39 } 39 }
40} 40}
41 41
42void white_background(struct screen* display){ 42static void white_background(struct screen* display){
43#if (LCD_DEPTH > 1) || (defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH > 1)) 43#if (LCD_DEPTH > 1) || (defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH > 1))
44 if(display->depth>1){ 44 if(display->depth>1){
45#if defined(HAVE_LCD_COLOR) 45#if defined(HAVE_LCD_COLOR)
@@ -53,18 +53,18 @@ void white_background(struct screen* display){
53 display->clear_display(); 53 display->clear_display();
54} 54}
55 55
56bool skin_require_black_background(int mode, int skin){ 56static bool skin_require_black_background(int mode, int skin){
57 return((mode==BINARY && skin==2) || (mode==DIGITAL && skin==1 )); 57 return((mode==BINARY && skin==2) || (mode==DIGITAL && skin==1 ));
58} 58}
59 59
60void skin_set_background(struct screen* display, int mode, int skin){ 60static void skin_set_background(struct screen* display, int mode, int skin){
61 if(skin_require_black_background(mode, skin) ) 61 if(skin_require_black_background(mode, skin) )
62 black_background(display); 62 black_background(display);
63 else 63 else
64 white_background(display); 64 white_background(display);
65} 65}
66 66
67void skin_restore_background(struct screen* display, int mode, int skin){ 67static void skin_restore_background(struct screen* display, int mode, int skin){
68 if(skin_require_black_background(mode, skin) ) 68 if(skin_require_black_background(mode, skin) )
69 white_background(display); 69 white_background(display);
70} 70}
diff --git a/apps/plugins/clock/clock_draw_analog.c b/apps/plugins/clock/clock_draw_analog.c
index b8ec308eed..bda7241d33 100644
--- a/apps/plugins/clock/clock_draw_analog.c
+++ b/apps/plugins/clock/clock_draw_analog.c
@@ -37,7 +37,7 @@
37#define SECOND_ANGLE(second) (6 * (second)) 37#define SECOND_ANGLE(second) (6 * (second))
38 38
39/* Note that the given angle's origin is midday and not 3 o'clock */ 39/* Note that the given angle's origin is midday and not 3 o'clock */
40void polar_to_cartesian(int a, int r, int* x, int* y) 40static void polar_to_cartesian(int a, int r, int* x, int* y)
41{ 41{
42#if CONFIG_LCD == LCD_SSD1815 42#if CONFIG_LCD == LCD_SSD1815
43 /* Correct non-square pixel aspect of archos recorder LCD */ 43 /* Correct non-square pixel aspect of archos recorder LCD */
@@ -48,7 +48,7 @@ void polar_to_cartesian(int a, int r, int* x, int* y)
48 *y = (fp14_sin(a-90) * r) >> 14; 48 *y = (fp14_sin(a-90) * r) >> 14;
49} 49}
50 50
51void polar_to_cartesian_screen_centered(struct screen * display, 51static void polar_to_cartesian_screen_centered(struct screen * display,
52 int a, int r, int* x, int* y) 52 int a, int r, int* x, int* y)
53{ 53{
54 polar_to_cartesian(a, r, x, y); 54 polar_to_cartesian(a, r, x, y);
@@ -56,7 +56,7 @@ void polar_to_cartesian_screen_centered(struct screen * display,
56 *y+=display->getheight()/2; 56 *y+=display->getheight()/2;
57} 57}
58 58
59void angle_to_square(int square_width, int square_height, 59static void angle_to_square(int square_width, int square_height,
60 int a, int* x, int* y) 60 int a, int* x, int* y)
61{ 61{
62 a = (a+360-90)%360; 62 a = (a+360-90)%360;
@@ -82,7 +82,7 @@ void angle_to_square(int square_width, int square_height,
82 } 82 }
83} 83}
84 84
85void angle_to_square_screen_centered(struct screen * display, 85static void angle_to_square_screen_centered(struct screen * display,
86 int square_width, int square_height, 86 int square_width, int square_height,
87 int a, int* x, int* y) 87 int a, int* x, int* y)
88{ 88{
@@ -91,7 +91,7 @@ void angle_to_square_screen_centered(struct screen * display,
91 *y+=display->getheight()/2; 91 *y+=display->getheight()/2;
92} 92}
93 93
94void draw_hand(struct screen* display, int angle, 94static void draw_hand(struct screen* display, int angle,
95 int radius, int thickness, bool round) 95 int radius, int thickness, bool round)
96{ 96{
97 int x1, y1; /* the longest */ 97 int x1, y1; /* the longest */
@@ -115,7 +115,7 @@ void draw_hand(struct screen* display, int angle,
115 rb->lcd_drawline(x1, y1, x3, y3); 115 rb->lcd_drawline(x1, y1, x3, y3);
116} 116}
117 117
118void draw_hands(struct screen* display, int hour, int minute, int second, 118static void draw_hands(struct screen* display, int hour, int minute, int second,
119 int thickness, bool round, bool draw_seconds) 119 int thickness, bool round, bool draw_seconds)
120{ 120{
121 if(draw_seconds){ 121 if(draw_seconds){
@@ -128,7 +128,7 @@ void draw_hands(struct screen* display, int hour, int minute, int second,
128 ANALOG_HOUR_RADIUS(display, round), thickness+2, round); 128 ANALOG_HOUR_RADIUS(display, round), thickness+2, round);
129} 129}
130 130
131void draw_counter(struct screen* display, struct counter* counter) 131static void draw_counter(struct screen* display, struct counter* counter)
132{ 132{
133 char buffer[10]; 133 char buffer[10];
134 int second_str_w, hour_str_w, str_h; 134 int second_str_w, hour_str_w, str_h;
@@ -150,7 +150,7 @@ void draw_counter(struct screen* display, struct counter* counter)
150 display->getheight()-str_h); 150 display->getheight()-str_h);
151} 151}
152 152
153void draw_date(struct screen* display, struct time* time, int date_format) 153static void draw_date(struct screen* display, struct time* time, int date_format)
154{ 154{
155 char buffer[10]; 155 char buffer[10];
156 int year_str_w, monthday_str_w, str_h; 156 int year_str_w, monthday_str_w, str_h;
@@ -176,7 +176,7 @@ void draw_date(struct screen* display, struct time* time, int date_format)
176 display->getheight()-monthday_line*str_h); 176 display->getheight()-monthday_line*str_h);
177} 177}
178 178
179void draw_border(struct screen* display, int skin) 179static void draw_border(struct screen* display, int skin)
180{ 180{
181 /* Draws square dots every 5 minutes */ 181 /* Draws square dots every 5 minutes */
182 int i; 182 int i;
@@ -197,7 +197,7 @@ void draw_border(struct screen* display, int skin)
197 } 197 }
198} 198}
199 199
200void draw_hour(struct screen* display, struct time* time, 200static void draw_hour(struct screen* display, struct time* time,
201 bool show_seconds, int skin) 201 bool show_seconds, int skin)
202{ 202{
203 int hour=time->hour; 203 int hour=time->hour;
@@ -220,7 +220,7 @@ void draw_hour(struct screen* display, struct time* time,
220 0, skin, show_seconds); 220 0, skin, show_seconds);
221} 221}
222 222
223void draw_center_cover(struct screen* display) 223static void draw_center_cover(struct screen* display)
224{ 224{
225 display->hline((display->getwidth()/2)-1, 225 display->hline((display->getwidth()/2)-1,
226 (display->getwidth()/2)+1, (display->getheight()/2)+3); 226 (display->getwidth()/2)+1, (display->getheight()/2)+3);
diff --git a/apps/plugins/clock/clock_draw_binary.c b/apps/plugins/clock/clock_draw_binary.c
index 620788dc5e..611ab1b371 100644
--- a/apps/plugins/clock/clock_draw_binary.c
+++ b/apps/plugins/clock/clock_draw_binary.c
@@ -25,7 +25,7 @@
25 25
26const struct picture* binary_skin[]={binary,digits,segments}; 26const struct picture* binary_skin[]={binary,digits,segments};
27 27
28void print_binary(char* buffer, int number, int nb_bits){ 28static void print_binary(char* buffer, int number, int nb_bits){
29 int i; 29 int i;
30 int mask=1; 30 int mask=1;
31 buffer[nb_bits]='\0'; 31 buffer[nb_bits]='\0';
diff --git a/apps/plugins/clock/clock_menu.c b/apps/plugins/clock/clock_menu.c
index ed0027305b..a597664f49 100644
--- a/apps/plugins/clock/clock_menu.c
+++ b/apps/plugins/clock/clock_menu.c
@@ -22,6 +22,7 @@
22#include "clock.h" 22#include "clock.h"
23#include "clock_bitmaps.h" 23#include "clock_bitmaps.h"
24#include "clock_settings.h" 24#include "clock_settings.h"
25#include "clock_menu.h"
25#include "lib/playback_control.h" 26#include "lib/playback_control.h"
26 27
27/* Option structs (possible selections per each option) */ 28/* Option structs (possible selections per each option) */
@@ -57,7 +58,7 @@ static const struct opt_items hour_format_text[] = {
57 * Select a mode, returs true when the mode has been selected 58 * Select a mode, returs true when the mode has been selected
58 * (we go back to clock display then) 59 * (we go back to clock display then)
59 **************/ 60 **************/
60bool menu_mode_selector(void){ 61static bool menu_mode_selector(void){
61 MENUITEM_STRINGLIST(menu,"Mode Selector",NULL, "Analog", 62 MENUITEM_STRINGLIST(menu,"Mode Selector",NULL, "Analog",
62 "Digital", "Binary"); 63 "Digital", "Binary");
63 if(rb->do_menu(&menu, &clock_settings.mode, NULL, false) >=0) 64 if(rb->do_menu(&menu, &clock_settings.mode, NULL, false) >=0)
@@ -68,7 +69,7 @@ bool menu_mode_selector(void){
68/********************** 69/**********************
69 * Analog settings menu 70 * Analog settings menu
70 *********************/ 71 *********************/
71void menu_analog_settings(void) 72static void menu_analog_settings(void)
72{ 73{
73 int selection=0, result=0; 74 int selection=0, result=0;
74 75
@@ -99,7 +100,7 @@ void menu_analog_settings(void)
99/*********************** 100/***********************
100 * Digital settings menu 101 * Digital settings menu
101 **********************/ 102 **********************/
102void menu_digital_settings(void){ 103static void menu_digital_settings(void){
103 int selection=0, result=0; 104 int selection=0, result=0;
104 105
105 MENUITEM_STRINGLIST(menu,"Digital Mode Settings",NULL,"Show Seconds", 106 MENUITEM_STRINGLIST(menu,"Digital Mode Settings",NULL,"Show Seconds",
@@ -125,7 +126,7 @@ void menu_digital_settings(void){
125/*********************************************************** 126/***********************************************************
126 * Confirm resetting of settings, used in general_settings() 127 * Confirm resetting of settings, used in general_settings()
127 **********************************************************/ 128 **********************************************************/
128void confirm_reset(void){ 129static void confirm_reset(void){
129 int result=0; 130 int result=0;
130 131
131 rb->set_option("Reset all settings?", &result, INT, noyes_text, 2, NULL); 132 rb->set_option("Reset all settings?", &result, INT, noyes_text, 2, NULL);
@@ -141,7 +142,7 @@ void confirm_reset(void){
141/************************************ 142/************************************
142 * General settings. Reset, save, etc 143 * General settings. Reset, save, etc
143 ***********************************/ 144 ***********************************/
144void menu_general_settings(void){ 145static void menu_general_settings(void){
145 int selection=0, result=0; 146 int selection=0, result=0;
146 147
147 MENUITEM_STRINGLIST(menu,"General Settings",NULL, 148 MENUITEM_STRINGLIST(menu,"General Settings",NULL,
diff --git a/apps/plugins/clock/clock_settings.c b/apps/plugins/clock/clock_settings.c
index 6dd1b5ee65..e559e1fe1b 100644
--- a/apps/plugins/clock/clock_settings.c
+++ b/apps/plugins/clock/clock_settings.c
@@ -51,7 +51,7 @@ struct clock_settings clock_settings;
51 * we can know at saving time if changes have been made */ 51 * we can know at saving time if changes have been made */
52struct clock_settings hdd_clock_settings; 52struct clock_settings hdd_clock_settings;
53 53
54bool settings_needs_saving(struct clock_settings* settings){ 54static bool settings_needs_saving(struct clock_settings* settings){
55 return(rb->memcmp(settings, &hdd_clock_settings, sizeof(*settings))); 55 return(rb->memcmp(settings, &hdd_clock_settings, sizeof(*settings)));
56} 56}
57 57
@@ -99,8 +99,8 @@ void clock_settings_skin_previous(struct clock_settings* settings){
99 settings->skin[settings->mode]=max_skin[settings->mode]-1; 99 settings->skin[settings->mode]=max_skin[settings->mode]-1;
100} 100}
101 101
102enum settings_file_status clock_settings_load(struct clock_settings* settings, 102static enum settings_file_status clock_settings_load(
103 char* filename){ 103 struct clock_settings* settings,char* filename){
104 int fd = rb->open(filename, O_RDONLY); 104 int fd = rb->open(filename, O_RDONLY);
105 if(fd >= 0){ /* does file exist? */ 105 if(fd >= 0){ /* does file exist? */
106 /* basic consistency check */ 106 /* basic consistency check */
@@ -117,8 +117,8 @@ enum settings_file_status clock_settings_load(struct clock_settings* settings,
117 return(ERRLOAD); 117 return(ERRLOAD);
118} 118}
119 119
120enum settings_file_status clock_settings_save(struct clock_settings* settings, 120static enum settings_file_status clock_settings_save(
121 char* filename){ 121 struct clock_settings* settings, char* filename){
122 int fd = rb->creat(filename, 0666); 122 int fd = rb->creat(filename, 0666);
123 if(fd >= 0){ /* does file exist? */ 123 if(fd >= 0){ /* does file exist? */
124 rb->write (fd, settings, sizeof(*settings)); 124 rb->write (fd, settings, sizeof(*settings));
@@ -128,7 +128,7 @@ enum settings_file_status clock_settings_save(struct clock_settings* settings,
128 return(ERRSAVE); 128 return(ERRSAVE);
129} 129}
130 130
131void draw_logo(struct screen* display){ 131static void draw_logo(struct screen* display){
132#ifdef HAVE_LCD_COLOR 132#ifdef HAVE_LCD_COLOR
133 if(display->is_color){ 133 if(display->is_color){
134 display->set_foreground(LCD_BLACK); 134 display->set_foreground(LCD_BLACK);
@@ -141,7 +141,7 @@ void draw_logo(struct screen* display){
141 picture_draw(display, logo, 0, 0); 141 picture_draw(display, logo, 0, 0);
142} 142}
143 143
144void draw_message(struct screen* display, int msg, int y){ 144static void draw_message(struct screen* display, int msg, int y){
145 const struct picture* message = &(messages[display->screen_type]); 145 const struct picture* message = &(messages[display->screen_type]);
146 display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 146 display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
147 display->fillrect(0, display->getheight()-message->slide_height, 147 display->fillrect(0, display->getheight()-message->slide_height,