Replaced NETSIM macro with general (and now actually working) solution in Makefile.include.

This commit is contained in:
oliverschmidt 2008-11-17 22:52:10 +00:00
parent 7ac49a573b
commit 7cf3165155
13 changed files with 66 additions and 66 deletions

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: shell-sendtest.c,v 1.4 2008/11/09 10:53:25 adamdunkels Exp $
* $Id: shell-sendtest.c,v 1.5 2008/11/17 22:52:10 oliverschmidt Exp $
*/
/**
@ -45,9 +45,9 @@
#include <stdio.h>
#include <string.h>
#if NETSIM
#if CONTIKI_TARGET_NETSIM
#include "ether.h"
#endif /* NETSIM */
#endif /* CONTIKI_TARGET_NETSIM */
#ifndef HAVE_SNPRINTF
int snprintf(char *str, size_t size, const char *format, ...);
#endif /* HAVE_SNPRINTF */
@ -66,14 +66,14 @@ static void
write_chunk(struct rucb_conn *c, int offset, int flag,
char *data, int datalen)
{
#if NETSIM
#if CONTIKI_TARGET_NETSIM
{
char buf[100];
printf("received %d; %d\n", offset, datalen);
sprintf(buf, "%lu%%", (100 * (offset + datalen)) / filesize);
ether_set_text(buf);
}
#endif /* NETSIM */
#endif /* CONTIKI_TARGET_NETSIM */
/* printf("+");*/
}
static int