Subversion Repositories Kolibri OS

Rev

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

  1. #include "format_scan.h"
  2. #include <stdlib.h>
  3.  
  4. int scanf ( const char * format, ...)
  5. {
  6.    va_list arg;
  7.    int  n;
  8.    va_start(arg, format);
  9.  
  10.    if(__scanf_buffer == NULL) __scanf_buffer = malloc(4096);
  11.    if(__scanf_buffer == NULL) return -3;
  12.  
  13.    *__scanf_buffer = 0;
  14.    n = vscanf(format, arg);
  15.  
  16.    va_end(arg);
  17.    return n;
  18. }
  19.  
  20.  
  21.