From d79b1d55f73ac04a5da1668942414f5ff4105dab Mon Sep 17 00:00:00 2001 From: fros4943 Date: Sun, 5 Oct 2008 15:40:27 +0000 Subject: [PATCH] not implementing putc(..FILE*) function, only stdout --- platform/cooja/sys/log.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/platform/cooja/sys/log.c b/platform/cooja/sys/log.c index 99a0c90ec..47a058a1e 100644 --- a/platform/cooja/sys/log.c +++ b/platform/cooja/sys/log.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: log.c,v 1.5 2008/10/03 09:41:16 fros4943 Exp $ + * $Id: log.c,v 1.6 2008/10/05 15:40:27 fros4943 Exp $ */ #include @@ -35,7 +35,7 @@ #include "sys/log.h" #include "lib/simEnvChange.h" -#define IMPLEMENT_PUTCHAR 1 +#define IMPLEMENT_PRINTF 1 #define MAX_LOG_LENGTH 1024 const struct simInterface simlog_interface; @@ -87,17 +87,9 @@ doInterfaceActionsBeforeTick(void) static void doInterfaceActionsAfterTick(void) { - fflush(stdout); -} -/*-----------------------------------------------------------------------------------*/ -#if IMPLEMENT_PUTCHAR -int -putc(int c, FILE *f) -{ - simlog_char(c); - return c; } /*-----------------------------------------------------------------------------------*/ +#if IMPLEMENT_PRINTF int putchar(int c) { @@ -125,7 +117,7 @@ printf(const char *fmt, ...) simlog(buf); return res; } -#endif /* IMPLEMENTS_PUTCHAR */ +#endif /* IMPLEMENT_PRINTF */ /*-----------------------------------------------------------------------------------*/ SIM_INTERFACE(simlog_interface,