Subversion Repositories Kolibri OS

Rev

Rev 6429 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <conio.h>
  4. #include <stdarg.h>
  5.  
  6. int printf(const char *format, ...)
  7. {
  8.    va_list      arg;
  9.    va_start(arg, format);
  10.  
  11.    return vprintf(format, arg);
  12. }
  13.  
  14.  
  15. int vprintf ( const char * format, va_list arg )
  16. {
  17.    int          i = 0;
  18.    int          printed_simbols = 0;
  19.    char         *s;
  20.  
  21.    i=con_init_console_dll();
  22.  
  23.    if (i == 0)
  24.    {
  25.      s = malloc(4096);
  26.      printed_simbols = format_print(s, 4096, format, arg);
  27.      con_write_string(s, printed_simbols);
  28.      free(s);
  29.    }
  30.  
  31.    return(printed_simbols);
  32. }
  33.