not implementing putc(..FILE*) function, only stdout

This commit is contained in:
fros4943 2008-10-05 15:40:27 +00:00
parent 10639bc982
commit d79b1d55f7

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * 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 <stdio.h> #include <stdio.h>
@ -35,7 +35,7 @@
#include "sys/log.h" #include "sys/log.h"
#include "lib/simEnvChange.h" #include "lib/simEnvChange.h"
#define IMPLEMENT_PUTCHAR 1 #define IMPLEMENT_PRINTF 1
#define MAX_LOG_LENGTH 1024 #define MAX_LOG_LENGTH 1024
const struct simInterface simlog_interface; const struct simInterface simlog_interface;
@ -87,17 +87,9 @@ doInterfaceActionsBeforeTick(void)
static void static void
doInterfaceActionsAfterTick(void) doInterfaceActionsAfterTick(void)
{ {
fflush(stdout);
}
/*-----------------------------------------------------------------------------------*/
#if IMPLEMENT_PUTCHAR
int
putc(int c, FILE *f)
{
simlog_char(c);
return c;
} }
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
#if IMPLEMENT_PRINTF
int int
putchar(int c) putchar(int c)
{ {
@ -125,7 +117,7 @@ printf(const char *fmt, ...)
simlog(buf); simlog(buf);
return res; return res;
} }
#endif /* IMPLEMENTS_PUTCHAR */ #endif /* IMPLEMENT_PRINTF */
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
SIM_INTERFACE(simlog_interface, SIM_INTERFACE(simlog_interface,