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/plugins/rockboy/menu.c | 8 ++++---- apps/plugins/rockboy/rockboy.make | 2 +- apps/plugins/rockboy/rtc.c | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'apps/plugins/rockboy') 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) { munge_name(name_buf, strlen(name_buf)); /* glom the whole mess together */ - snprintf(buf, bufsiz, "%s/%s-%ld.rbs", STATE_DIR, name_buf, slot_id + 1); + snprintf(buf, bufsiz, "%s/%s-%zud.rbs", STATE_DIR, name_buf, slot_id + 1); } /* @@ -253,17 +253,17 @@ static void slot_info(char *info_buf, size_t info_bufsiz, size_t slot_id) { if (read(fd, buf, 20) > 0) { buf[20] = '\0'; - snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, buf); + snprintf(info_buf, info_bufsiz, "%zud. %s", slot_id + 1, buf); } else - snprintf(info_buf, info_bufsiz, "%ld. ERROR", slot_id + 1); + snprintf(info_buf, info_bufsiz, "%zud. ERROR", slot_id + 1); close(fd); } else { /* if we couldn't open the file, then the slot is empty */ - snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, ""); + snprintf(info_buf, info_bufsiz, "%zu. %s", slot_id + 1, ""); } } 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 ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES) -ROCKBOY_SRC += $(ROOTDIR)/firmware/common/sscanf.c +ROCKBOY_SRC += $(ROOTDIR)/firmware/libc/sscanf.c ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC)) 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 @@ #include "defs.h" #include "mem.h" #include "rtc-gb.h" -#include "sscanf.h" struct rtc rtc; -- cgit v1.2.3