Subversion Repositories Kolibri OS

Rev

Rev 6412 | Blame | Last modification | View Log | Download | RSS feed

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int fprintf(FILE* file, const char* format, ...)
  5. {
  6. va_list         arg;
  7. char            *buf;
  8. int             printed;
  9. //int           data[4];
  10.        
  11.   va_start (arg, format);
  12.   buf=malloc(4096*2); //8kb max
  13.   //data[0]=(int)&arg-(int)&format;
  14.  
  15.   printed=format_print(buf,8191, format,arg);
  16.   if (file == stderr)
  17.         debug_out_str(buf);
  18.   else
  19.         fwrite(buf,printed,1,file);
  20.   free(buf);
  21.  
  22.   return(printed);
  23. }
  24.