summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/bitmap/list.c1
-rw-r--r--apps/gui/charcell/list.c1
-rw-r--r--apps/gui/list.c2
-rw-r--r--apps/gui/option_select.c3
-rw-r--r--apps/gui/pitchscreen.c15
-rw-r--r--apps/gui/skin_engine/skin_backdrops.c3
-rw-r--r--apps/gui/skin_engine/skin_display.c2
-rw-r--r--apps/gui/skin_engine/skin_tokens.c14
-rw-r--r--apps/gui/statusbar.c2
-rw-r--r--apps/gui/usb_screen.c1
-rw-r--r--apps/gui/viewport.c1
-rw-r--r--apps/gui/wps.c1
12 files changed, 19 insertions, 27 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index 10616c9df4..0da67c7c1e 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -25,7 +25,6 @@
25#include "lcd.h" 25#include "lcd.h"
26#include "font.h" 26#include "font.h"
27#include "button.h" 27#include "button.h"
28#include "sprintf.h"
29#include "string.h" 28#include "string.h"
30#include "settings.h" 29#include "settings.h"
31#include "kernel.h" 30#include "kernel.h"
diff --git a/apps/gui/charcell/list.c b/apps/gui/charcell/list.c
index f36d3c9f7d..8eebfe7fa1 100644
--- a/apps/gui/charcell/list.c
+++ b/apps/gui/charcell/list.c
@@ -25,7 +25,6 @@
25#include "lcd.h" 25#include "lcd.h"
26#include "font.h" 26#include "font.h"
27#include "button.h" 27#include "button.h"
28#include "sprintf.h"
29#include "string.h" 28#include "string.h"
30#include "settings.h" 29#include "settings.h"
31#include "kernel.h" 30#include "kernel.h"
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 11a4c36015..de76310e0b 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -19,11 +19,11 @@
19 * 19 *
20 ****************************************************************************/ 20 ****************************************************************************/
21 21
22#include <stdarg.h>
22#include "config.h" 23#include "config.h"
23#include "lcd.h" 24#include "lcd.h"
24#include "font.h" 25#include "font.h"
25#include "button.h" 26#include "button.h"
26#include "sprintf.h"
27#include "string.h" 27#include "string.h"
28#include "settings.h" 28#include "settings.h"
29#include "kernel.h" 29#include "kernel.h"
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c
index 71a28cb520..feed1dc2db 100644
--- a/apps/gui/option_select.c
+++ b/apps/gui/option_select.c
@@ -20,10 +20,9 @@
20 * 20 *
21 ****************************************************************************/ 21 ****************************************************************************/
22#include <stdlib.h> 22#include <stdlib.h>
23#include <string.h> 23#include "string-extra.h"
24#include "config.h" 24#include "config.h"
25#include "option_select.h" 25#include "option_select.h"
26#include "sprintf.h"
27#include "kernel.h" 26#include "kernel.h"
28#include "lang.h" 27#include "lang.h"
29#include "talk.h" 28#include "talk.h"
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c
index 77b5739be1..a0058724ec 100644
--- a/apps/gui/pitchscreen.c
+++ b/apps/gui/pitchscreen.c
@@ -23,9 +23,8 @@
23#include <string.h> 23#include <string.h>
24#include <stdio.h> 24#include <stdio.h>
25#include <math.h> 25#include <math.h>
26#include <stdlib.h> /* for ABS() */ 26#include <stdlib.h> /* for abs() */
27#include "config.h" 27#include "config.h"
28#include "sprintf.h"
29#include "action.h" 28#include "action.h"
30#include "dsp.h" 29#include "dsp.h"
31#include "sound.h" 30#include "sound.h"
@@ -248,10 +247,10 @@ static void pitchscreen_draw(struct screen *display, int max_lines,
248 /* Pitch:XXX.X% */ 247 /* Pitch:XXX.X% */
249 if(global_settings.pitch_mode_semitone) 248 if(global_settings.pitch_mode_semitone)
250 { 249 {
251 snprintf(buf, sizeof(buf), "%s: %s%ld.%02ld", str(LANG_PITCH), 250 snprintf(buf, sizeof(buf), "%s: %s%d.%02d", str(LANG_PITCH),
252 semitone >= 0 ? "+" : "-", 251 semitone >= 0 ? "+" : "-",
253 ABS(semitone / PITCH_SPEED_PRECISION), 252 abs(semitone / PITCH_SPEED_PRECISION),
254 ABS((semitone % PITCH_SPEED_PRECISION) / 253 abs((semitone % PITCH_SPEED_PRECISION) /
255 (PITCH_SPEED_PRECISION / 100)) 254 (PITCH_SPEED_PRECISION / 100))
256 ); 255 );
257 } 256 }
@@ -290,10 +289,10 @@ static void pitchscreen_draw(struct screen *display, int max_lines,
290 { 289 {
291 if(global_settings.pitch_mode_semitone) 290 if(global_settings.pitch_mode_semitone)
292 { 291 {
293 snprintf(buf, sizeof(buf), "%s%ld.%02ld", 292 snprintf(buf, sizeof(buf), "%s%d.%02d",
294 semitone >= 0 ? "+" : "-", 293 semitone >= 0 ? "+" : "-",
295 ABS(semitone / PITCH_SPEED_PRECISION), 294 abs(semitone / PITCH_SPEED_PRECISION),
296 ABS((semitone % PITCH_SPEED_PRECISION) / 295 abs((semitone % PITCH_SPEED_PRECISION) /
297 (PITCH_SPEED_PRECISION / 100)) 296 (PITCH_SPEED_PRECISION / 100))
298 ); 297 );
299 } 298 }
diff --git a/apps/gui/skin_engine/skin_backdrops.c b/apps/gui/skin_engine/skin_backdrops.c
index fd786a7882..77de8bdc1a 100644
--- a/apps/gui/skin_engine/skin_backdrops.c
+++ b/apps/gui/skin_engine/skin_backdrops.c
@@ -21,9 +21,8 @@
21 21
22#include "config.h" 22#include "config.h"
23#include <stdio.h> 23#include <stdio.h>
24#include <string.h>
25#include <stdlib.h> 24#include <stdlib.h>
26 25#include "string-extra.h"
27#include "settings.h" 26#include "settings.h"
28#include "skin_buffer.h" 27#include "skin_buffer.h"
29#include "wps_internals.h" 28#include "wps_internals.h"
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 0d7824aaf6..d3169be43a 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -21,7 +21,7 @@
21 ****************************************************************************/ 21 ****************************************************************************/
22#include "config.h" 22#include "config.h"
23#include <stdio.h> 23#include <stdio.h>
24#include <string.h> 24#include "string-extra.h"
25#include "misc.h" 25#include "misc.h"
26#include "font.h" 26#include "font.h"
27#include "system.h" 27#include "system.h"
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 4ee8c74cdd..6e5a2eae85 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -21,7 +21,7 @@
21 ****************************************************************************/ 21 ****************************************************************************/
22#include "font.h" 22#include "font.h"
23#include <stdio.h> 23#include <stdio.h>
24#include <string.h> 24#include "string-extra.h"
25#include <stdlib.h> 25#include <stdlib.h>
26#include "action.h" 26#include "action.h"
27#include "system.h" 27#include "system.h"
@@ -247,7 +247,7 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
247 { 247 {
248 *intval = limit * elapsed / length + 1; 248 *intval = limit * elapsed / length + 1;
249 } 249 }
250 snprintf(buf, buf_size, "%d", 100 * elapsed / length); 250 snprintf(buf, buf_size, "%lu", 100 * elapsed / length);
251 return buf; 251 return buf;
252 252
253 253
@@ -269,7 +269,7 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
269 if ((id3->frequency % 1000) < 100) 269 if ((id3->frequency % 1000) < 100)
270 snprintf(buf, buf_size, "%ld", id3->frequency / 1000); 270 snprintf(buf, buf_size, "%ld", id3->frequency / 1000);
271 else 271 else
272 snprintf(buf, buf_size, "%ld.%d", 272 snprintf(buf, buf_size, "%ld.%lu",
273 id3->frequency / 1000, 273 id3->frequency / 1000,
274 (id3->frequency % 1000) / 100); 274 (id3->frequency % 1000) / 100);
275 return buf; 275 return buf;
@@ -302,12 +302,12 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
302 case WPS_TOKEN_DATABASE_RATING: 302 case WPS_TOKEN_DATABASE_RATING:
303 if (intval) 303 if (intval)
304 *intval = id3->rating + 1; 304 *intval = id3->rating + 1;
305 snprintf(buf, buf_size, "%ld", id3->rating); 305 snprintf(buf, buf_size, "%d", id3->rating);
306 return buf; 306 return buf;
307 case WPS_TOKEN_DATABASE_AUTOSCORE: 307 case WPS_TOKEN_DATABASE_AUTOSCORE:
308 if (intval) 308 if (intval)
309 *intval = id3->score + 1; 309 *intval = id3->score + 1;
310 snprintf(buf, buf_size, "%ld", id3->score); 310 snprintf(buf, buf_size, "%d", id3->score);
311 return buf; 311 return buf;
312#endif 312#endif
313 313
@@ -1064,7 +1064,7 @@ const char *get_token_value(struct gui_wps *gwps,
1064 break;) 1064 break;)
1065 } 1065 }
1066 } 1066 }
1067 snprintf(buf, buf_size, "%d.%1d", samprk/1000,samprk%1000); 1067 snprintf(buf, buf_size, "%lu.%1lu", samprk/1000,samprk%1000);
1068#else /* HWCODEC */ 1068#else /* HWCODEC */
1069 1069
1070 static const char * const freq_strings[] = 1070 static const char * const freq_strings[] =
@@ -1164,7 +1164,7 @@ const char *get_token_value(struct gui_wps *gwps,
1164 #endif 1164 #endif
1165 *intval = global_settings.mp3_enc_config.bitrate+1; 1165 *intval = global_settings.mp3_enc_config.bitrate+1;
1166 } 1166 }
1167 snprintf(buf, buf_size, "%d", global_settings.mp3_enc_config.bitrate+1); 1167 snprintf(buf, buf_size, "%lu", global_settings.mp3_enc_config.bitrate+1);
1168 return buf; 1168 return buf;
1169 } 1169 }
1170 else 1170 else
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index bc5570ee4e..901615d98a 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -19,11 +19,11 @@
19 * 19 *
20 ****************************************************************************/ 20 ****************************************************************************/
21 21
22#include <stdio.h>
22#include "config.h" 23#include "config.h"
23#include "font.h" 24#include "font.h"
24#include "kernel.h" 25#include "kernel.h"
25#include "string.h" /* for memcmp oO*/ 26#include "string.h" /* for memcmp oO*/
26#include "sprintf.h"
27#include "sound.h" 27#include "sound.h"
28#include "settings.h" 28#include "settings.h"
29#include "viewport.h" 29#include "viewport.h"
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c
index 019aec61ff..9895defc2b 100644
--- a/apps/gui/usb_screen.c
+++ b/apps/gui/usb_screen.c
@@ -30,7 +30,6 @@
30#include "usb_core.h" 30#include "usb_core.h"
31#ifdef USB_ENABLE_HID 31#ifdef USB_ENABLE_HID
32#include "usb_keymaps.h" 32#include "usb_keymaps.h"
33#include "sprintf.h"
34#endif 33#endif
35#endif 34#endif
36#include "settings.h" 35#include "settings.h"
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c
index 03f004ba87..7d128188c3 100644
--- a/apps/gui/viewport.c
+++ b/apps/gui/viewport.c
@@ -41,7 +41,6 @@
41/* all below isn't needed for pc tools (i.e. checkwps/wps editor) 41/* all below isn't needed for pc tools (i.e. checkwps/wps editor)
42 * only viewport_parse_viewport() is */ 42 * only viewport_parse_viewport() is */
43#ifndef __PCTOOL__ 43#ifndef __PCTOOL__
44#include "sprintf.h"
45#include "string.h" 44#include "string.h"
46#include "kernel.h" 45#include "kernel.h"
47#include "system.h" 46#include "system.h"
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index afd7f3f2d0..916ca2cbcf 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -31,7 +31,6 @@
31#include "action.h" 31#include "action.h"
32#include "kernel.h" 32#include "kernel.h"
33#include "filetypes.h" 33#include "filetypes.h"
34#include "sprintf.h"
35#include "settings.h" 34#include "settings.h"
36#include "skin_engine/skin_engine.h" 35#include "skin_engine/skin_engine.h"
37#include "mp3_playback.h" 36#include "mp3_playback.h"