mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +00:00
37 lines
631 B
C
37 lines
631 B
C
|
/*
|
||
|
* 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);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|