summaryrefslogtreecommitdiff
path: root/apps/gui/pitchscreen.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-05-06 21:04:40 +0000
committerThomas Martitz <kugel@rockbox.org>2010-05-06 21:04:40 +0000
commit50a6ca39ad4ed01922aa4f755f0ca579788226cf (patch)
treec7881b015b220558167310345b162324c96be15a /apps/gui/pitchscreen.c
parentadb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff)
downloadrockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.gz
rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.zip
Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/pitchscreen.c')
-rw-r--r--apps/gui/pitchscreen.c15
1 files changed, 7 insertions, 8 deletions
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 }