diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
commit | 50a6ca39ad4ed01922aa4f755f0ca579788226cf (patch) | |
tree | c7881b015b220558167310345b162324c96be15a /apps/gui/skin_engine | |
parent | adb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff) | |
download | rockbox-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/skin_engine')
-rw-r--r-- | apps/gui/skin_engine/skin_backdrops.c | 3 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 2 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 14 |
3 files changed, 9 insertions, 10 deletions
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 |