kolibrios/programs/develop/ktcc/trunk/libc/stdio/printf.c
siemargl b5e7b54c7a compiler 0.9.26 release
git-svn-id: svn://kolibrios.org@6429 a494cfbc-eb01-0410-851d-a64ba20cac60
2016-05-14 08:56:15 +00:00

26 lines
466 B
C

#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int printf(const char *format, ...)
{
int i = 0;
int printed_simbols = 0;
va_list arg;
char *s;
va_start(arg,format);
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);
}