Subversion Repositories Kolibri OS

Rev

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

  1. /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
  2. /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
  3. #include <stdio.h>
  4. #include <stdarg.h>
  5. #include <libc/file.h>
  6. #include <libc/unconst.h>
  7.  
  8. int
  9. vsscanf(const char *str, const char *fmt, va_list ap)
  10. {
  11.   FILE _strbuf;
  12.  
  13.   _strbuf._flag = _IOREAD|_IOSTRG|_IONTERM;
  14.   _strbuf._ptr = _strbuf._base = unconst(str, char *);
  15.   _strbuf._cnt = 0;
  16.   while (*str++)
  17.     _strbuf._cnt++;
  18.   _strbuf._bufsiz = _strbuf._cnt;
  19.   return _doscan(&_strbuf, fmt, ap);
  20. }
  21.