panthema / 2006 / SDIOS06 / sdios06 / lib / libc / fscanf.c (Download File)

#include <stdarg.h>
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>

#include "dietstdio.h"

int vfscanf(FILE *stream, const char *format, va_list arg_ptr)
{
	struct arg_scanf farg = { (void*)stream, (int(*)(void*))fgetc, (int(*)(int,void*))ungetc };
	return __v_scanf(&farg,format,arg_ptr);
}

int fscanf(FILE *stream, const char *format, ...)
{
	int n;
	va_list arg_ptr;
	va_start(arg_ptr, format);
	n = vfscanf(stream,format,arg_ptr);
	va_end (arg_ptr);
	return n;
}
RSS 2.0 Weblog Feed Atom 1.0 Weblog Feed Valid XHTML 1.1 Valid CSS (2.1)
Copyright 2005-2014 Timo Bingmann - Impressum