summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_tokens.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/skin_engine/skin_tokens.c
parentadb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff)
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/skin_engine/skin_tokens.c')
-rw-r--r--apps/gui/skin_engine/skin_tokens.c14
1 files changed, 7 insertions, 7 deletions
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 @@
****************************************************************************/
#include "font.h"
#include <stdio.h>
-#include <string.h>
+#include "string-extra.h"
#include <stdlib.h>
#include "action.h"
#include "system.h"
@@ -247,7 +247,7 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
{
*intval = limit * elapsed / length + 1;
}
- snprintf(buf, buf_size, "%d", 100 * elapsed / length);
+ snprintf(buf, buf_size, "%lu", 100 * elapsed / length);
return buf;
@@ -269,7 +269,7 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
if ((id3->frequency % 1000) < 100)
snprintf(buf, buf_size, "%ld", id3->frequency / 1000);
else
- snprintf(buf, buf_size, "%ld.%d",
+ snprintf(buf, buf_size, "%ld.%lu",
id3->frequency / 1000,
(id3->frequency % 1000) / 100);
return buf;
@@ -302,12 +302,12 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
case WPS_TOKEN_DATABASE_RATING:
if (intval)
*intval = id3->rating + 1;
- snprintf(buf, buf_size, "%ld", id3->rating);
+ snprintf(buf, buf_size, "%d", id3->rating);
return buf;
case WPS_TOKEN_DATABASE_AUTOSCORE:
if (intval)
*intval = id3->score + 1;
- snprintf(buf, buf_size, "%ld", id3->score);
+ snprintf(buf, buf_size, "%d", id3->score);
return buf;
#endif
@@ -1064,7 +1064,7 @@ const char *get_token_value(struct gui_wps *gwps,
break;)
}
}
- snprintf(buf, buf_size, "%d.%1d", samprk/1000,samprk%1000);
+ snprintf(buf, buf_size, "%lu.%1lu", samprk/1000,samprk%1000);
#else /* HWCODEC */
static const char * const freq_strings[] =
@@ -1164,7 +1164,7 @@ const char *get_token_value(struct gui_wps *gwps,
#endif
*intval = global_settings.mp3_enc_config.bitrate+1;
}
- snprintf(buf, buf_size, "%d", global_settings.mp3_enc_config.bitrate+1);
+ snprintf(buf, buf_size, "%lu", global_settings.mp3_enc_config.bitrate+1);
return buf;
}
else