From 50a6ca39ad4ed01922aa4f755f0ca579788226cf Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 6 May 2010 21:04:40 +0000 Subject: 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 --- apps/gui/pitchscreen.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'apps/gui/pitchscreen.c') 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 @@ #include #include #include -#include /* for ABS() */ +#include /* for abs() */ #include "config.h" -#include "sprintf.h" #include "action.h" #include "dsp.h" #include "sound.h" @@ -248,10 +247,10 @@ static void pitchscreen_draw(struct screen *display, int max_lines, /* Pitch:XXX.X% */ if(global_settings.pitch_mode_semitone) { - snprintf(buf, sizeof(buf), "%s: %s%ld.%02ld", str(LANG_PITCH), + snprintf(buf, sizeof(buf), "%s: %s%d.%02d", str(LANG_PITCH), semitone >= 0 ? "+" : "-", - ABS(semitone / PITCH_SPEED_PRECISION), - ABS((semitone % PITCH_SPEED_PRECISION) / + abs(semitone / PITCH_SPEED_PRECISION), + abs((semitone % PITCH_SPEED_PRECISION) / (PITCH_SPEED_PRECISION / 100)) ); } @@ -290,10 +289,10 @@ static void pitchscreen_draw(struct screen *display, int max_lines, { if(global_settings.pitch_mode_semitone) { - snprintf(buf, sizeof(buf), "%s%ld.%02ld", + snprintf(buf, sizeof(buf), "%s%d.%02d", semitone >= 0 ? "+" : "-", - ABS(semitone / PITCH_SPEED_PRECISION), - ABS((semitone % PITCH_SPEED_PRECISION) / + abs(semitone / PITCH_SPEED_PRECISION), + abs((semitone % PITCH_SPEED_PRECISION) / (PITCH_SPEED_PRECISION / 100)) ); } -- cgit v1.2.3