kolibrios-fun/programs/develop/ktcc/trunk/libc/stdio/printf.c
siemargl ace23ebbe2 libc testsuite + fixes
git-svn-id: svn://kolibrios.org@6433 a494cfbc-eb01-0410-851d-a64ba20cac60
2016-05-19 12:15:22 +00:00

33 lines
590 B
C

#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <stdarg.h>
int printf(const char *format, ...)
{
va_list arg;
va_start(arg, format);
return vprintf(format, arg);
}
int vprintf ( const char * format, va_list arg )
{
int i = 0;
int printed_simbols = 0;
char *s;
i=con_init_console_dll();
if (i == 0)
{
s = malloc(4096);
printed_simbols = format_print(s, 4096, format, arg);
con_write_string(s, printed_simbols);
free(s);
}
return(printed_simbols);
}