Subversion Repositories Kolibri OS

Rev

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

  1. /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
  2. #include <stdio.h>
  3. #include <stdarg.h>
  4. #include <limits.h>
  5. #include <libc/file.h>
  6.  
  7. int
  8. vsprintf(char *str, const char *fmt, va_list ap)
  9. {
  10.   FILE f;
  11.   int len;
  12.  
  13.   f._flag = _IOWRT|_IOSTRG;
  14.   f._ptr = str;
  15.   f._cnt = INT_MAX;
  16.   len = _doprnt(fmt, ap, &f);
  17.   *f._ptr = 0;
  18.   return len;
  19. }
  20.