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/plugins/rockboy | |
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/plugins/rockboy')
-rw-r--r-- | apps/plugins/rockboy/menu.c | 8 | ||||
-rw-r--r-- | apps/plugins/rockboy/rockboy.make | 2 | ||||
-rw-r--r-- | apps/plugins/rockboy/rtc.c | 1 |
3 files changed, 5 insertions, 6 deletions
diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c index 2f6c3102ff..e081a81d18 100644 --- a/apps/plugins/rockboy/menu.c +++ b/apps/plugins/rockboy/menu.c | |||
@@ -158,7 +158,7 @@ static void build_slot_path(char *buf, size_t bufsiz, size_t slot_id) { | |||
158 | munge_name(name_buf, strlen(name_buf)); | 158 | munge_name(name_buf, strlen(name_buf)); |
159 | 159 | ||
160 | /* glom the whole mess together */ | 160 | /* glom the whole mess together */ |
161 | snprintf(buf, bufsiz, "%s/%s-%ld.rbs", STATE_DIR, name_buf, slot_id + 1); | 161 | snprintf(buf, bufsiz, "%s/%s-%zud.rbs", STATE_DIR, name_buf, slot_id + 1); |
162 | } | 162 | } |
163 | 163 | ||
164 | /* | 164 | /* |
@@ -253,17 +253,17 @@ static void slot_info(char *info_buf, size_t info_bufsiz, size_t slot_id) { | |||
253 | if (read(fd, buf, 20) > 0) | 253 | if (read(fd, buf, 20) > 0) |
254 | { | 254 | { |
255 | buf[20] = '\0'; | 255 | buf[20] = '\0'; |
256 | snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, buf); | 256 | snprintf(info_buf, info_bufsiz, "%zud. %s", slot_id + 1, buf); |
257 | } | 257 | } |
258 | else | 258 | else |
259 | snprintf(info_buf, info_bufsiz, "%ld. ERROR", slot_id + 1); | 259 | snprintf(info_buf, info_bufsiz, "%zud. ERROR", slot_id + 1); |
260 | 260 | ||
261 | close(fd); | 261 | close(fd); |
262 | } | 262 | } |
263 | else | 263 | else |
264 | { | 264 | { |
265 | /* if we couldn't open the file, then the slot is empty */ | 265 | /* if we couldn't open the file, then the slot is empty */ |
266 | snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, "<Empty>"); | 266 | snprintf(info_buf, info_bufsiz, "%zu. %s", slot_id + 1, "<Empty>"); |
267 | } | 267 | } |
268 | } | 268 | } |
269 | 269 | ||
diff --git a/apps/plugins/rockboy/rockboy.make b/apps/plugins/rockboy/rockboy.make index ca0ed17a0a..81e9a1f798 100644 --- a/apps/plugins/rockboy/rockboy.make +++ b/apps/plugins/rockboy/rockboy.make | |||
@@ -11,7 +11,7 @@ ROCKBOY_SRCDIR = $(APPSDIR)/plugins/rockboy | |||
11 | ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy | 11 | ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy |
12 | 12 | ||
13 | ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES) | 13 | ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES) |
14 | ROCKBOY_SRC += $(ROOTDIR)/firmware/common/sscanf.c | 14 | ROCKBOY_SRC += $(ROOTDIR)/firmware/libc/sscanf.c |
15 | ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC)) | 15 | ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC)) |
16 | 16 | ||
17 | OTHER_SRC += $(ROCKBOY_SRC) | 17 | OTHER_SRC += $(ROCKBOY_SRC) |
diff --git a/apps/plugins/rockboy/rtc.c b/apps/plugins/rockboy/rtc.c index 6f33bc4f9d..248ebc0714 100644 --- a/apps/plugins/rockboy/rtc.c +++ b/apps/plugins/rockboy/rtc.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include "defs.h" | 7 | #include "defs.h" |
8 | #include "mem.h" | 8 | #include "mem.h" |
9 | #include "rtc-gb.h" | 9 | #include "rtc-gb.h" |
10 | #include "sscanf.h" | ||
11 | 10 | ||
12 | struct rtc rtc; | 11 | struct rtc rtc; |
13 | 12 | ||