1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- /*
- 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 <stdio.h>
- 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 <stdio.h>
- #include <stdarg.h>
- 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
|