2016-04-30 15:50:04 +02:00
|
|
|
#include <stdlib.h>
|
2007-10-15 11:42:17 +02:00
|
|
|
#include <stdio.h>
|
2016-05-14 10:56:15 +02:00
|
|
|
#include <conio.h>
|
2007-10-15 11:42:17 +02:00
|
|
|
|
2016-05-14 10:56:15 +02:00
|
|
|
int printf(const char *format, ...)
|
2007-10-15 11:42:17 +02:00
|
|
|
{
|
2016-05-11 16:53:54 +02:00
|
|
|
int i = 0;
|
2016-05-14 10:56:15 +02:00
|
|
|
int printed_simbols = 0;
|
2007-10-15 11:42:17 +02:00
|
|
|
va_list arg;
|
|
|
|
char *s;
|
|
|
|
|
|
|
|
va_start(arg,format);
|
|
|
|
|
2016-05-14 10:56:15 +02:00
|
|
|
i=con_init_console_dll();
|
2007-10-15 11:42:17 +02:00
|
|
|
|
|
|
|
if (i==0)
|
|
|
|
{
|
|
|
|
s=malloc(4096);
|
|
|
|
printed_simbols=format_print(s,4096,format,arg);
|
2016-05-14 10:56:15 +02:00
|
|
|
con_write_string(s, printed_simbols);
|
2007-10-15 11:42:17 +02:00
|
|
|
free(s);
|
|
|
|
}
|
|
|
|
return(printed_simbols);
|
|
|
|
}
|
|
|
|
|