2001-03-13 07:59:17 +00:00
|
|
|
/*
|
2014-06-30 09:10:35 +00:00
|
|
|
** _scanf.h
|
|
|
|
**
|
|
|
|
** (c) Copyright 2004, Ullrich von Bassewitz <uz@cc65.org>
|
|
|
|
**
|
|
|
|
*/
|
2001-03-13 07:59:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __SCANF_H
|
|
|
|
#define __SCANF_H
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-04-19 06:46:30 +00:00
|
|
|
/* Type of the function that is called to input data. The function will
|
2014-06-30 09:10:35 +00:00
|
|
|
** return EOF if no more data is available.
|
|
|
|
*/
|
2004-11-26 22:16:54 +00:00
|
|
|
typedef int __fastcall__ (*getfunc) (void* data);
|
2005-02-14 09:19:59 +00:00
|
|
|
|
|
|
|
/* Type of the function that is called to put back unused data */
|
2004-11-26 22:16:54 +00:00
|
|
|
typedef int __fastcall__ (*ungetfunc) (int c, void* data);
|
2001-03-13 07:59:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Control structure passed to the low level worker function.
|
2014-06-30 09:10:35 +00:00
|
|
|
** Beware: This structure is mirrored in the _scanf.inc assembler include
|
|
|
|
** file, so check this when altering the structure.
|
|
|
|
*/
|
2004-11-26 22:16:54 +00:00
|
|
|
struct scanfdata {
|
2013-05-09 11:56:54 +00:00
|
|
|
getfunc get; /* Pointer to input routine */
|
|
|
|
ungetfunc unget; /* Pointer to pushback routine */
|
|
|
|
void* data; /* Pointer to struct. used outside of _scanf() */
|
2001-03-13 07:59:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Internal scanning routine */
|
2005-02-14 09:19:59 +00:00
|
|
|
int __fastcall__ _scanf (const struct scanfdata* d, const char* format, va_list ap);
|
2001-03-13 07:59:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* End of _scanf.h */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|