/* Copyright 锟?1995-2001, The AROS Development Team. All rights reserved. $Id: vsscanf.c 19082 2003-08-05 13:18:17Z chodorowski $ C function vsscanf(). */ /* Original source from libnix */ #include "precompile.h" #include "vsscanf.h" #include static int _vsscanf_get (char ** str) { if (!**str) return EOF; return *(*str)++; } static int _vsscanf_unget (int c, char ** str) { (*str)--; return c; } /***************************************************************************** NAME */ #include #include int __vcscan ( /* SYNOPSIS */ void * data, int (* f_getc)(void *), int (* f_ungetc)(int,void *), const char * format, va_list args); #if defined(_MSC_VER) && _MSC_VER < 1900 TOOLKIT_API int vsscanf ( /* SYNOPSIS */ const char *str, const char *format, va_list args) /* FUNCTION Scan a string and convert it into the arguments as specified by format. INPUTS str - Scan this string format - A scanf() format string. args - A list of arguments for the results RESULT The number of arguments converted. NOTES EXAMPLE BUGS SEE ALSO scanf(), sscanf(), fscanf(), vscanf(), vfscanf(), snscanf(), vsnscanf() INTERNALS ******************************************************************************/ { int rc; rc = __vcscan (&str, (void *)_vsscanf_get, (void *)_vsscanf_unget, format, args ); return rc; } /* vsscanf */ #endif //defined(_MSC_VER) && _MSC_VER < 1900