Rewrote _scanf. It does need some tests and improvements, but it's a more

standard version than before, and it does support the necessary functionality
to support scanf functions for files.
Added vfscanf, fscanf and vfscanf.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3301 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2004-11-26 22:16:54 +00:00
parent e35b91ed3b
commit b1d4e1613b
8 changed files with 369 additions and 173 deletions

36
libsrc/common/scanf.c Normal file
View File

@@ -0,0 +1,36 @@
/*
* scanf.c
*
* Ullrich von Bassewitz (uz@cc65.org), 2004-11-26
*
*/
#include <stdio.h>
/*****************************************************************************/
/* Code */
/*****************************************************************************/
int scanf (const char* format, ...)
/* Standard C function */
{
va_list ap;
/* Setup for variable arguments */
va_start (ap, format);
/* Call vfscanf(). Since we know that va_end won't do anything, we will
* save the call and return the value directly.
*/
return vfscanf (stdin, format, ap);
}