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
* 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>
@ -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,