2001-03-13 07:59:17 +00:00
|
|
|
/*
|
|
|
|
* _scanf.h
|
|
|
|
*
|
|
|
|
* (C) Copyright 2001 Ullrich von Bassewitz (uz@cc65.org)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#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
|
|
|
|
* return EOF if no more data is available.
|
|
|
|
*/
|
2004-11-26 22:16:54 +00:00
|
|
|
typedef int __fastcall__ (*getfunc) (void* data);
|
|
|
|
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.
|
2004-11-27 14:45:49 +00:00
|
|
|
* Beware: This structure is mirrored in the _scanf.inc assembler include
|
|
|
|
* file, so check this when altering the structure.
|
2001-03-13 07:59:17 +00:00
|
|
|
*/
|
2004-11-26 22:16:54 +00:00
|
|
|
struct scanfdata {
|
|
|
|
getfunc get; /* Pointer to input routine */
|
|
|
|
ungetfunc unget; /* Pointer to pushback routine */
|
2001-04-19 06:46:30 +00:00
|
|
|
|
2004-06-04 14:47:21 +00:00
|
|
|
/* Fields used outside of _scanf */
|
2004-11-26 22:16:54 +00:00
|
|
|
void* data; /* Caller data */
|
2001-03-13 07:59:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Internal scanning routine */
|
2004-11-27 14:45:49 +00:00
|
|
|
int __fastcall__ _scanf (struct scanfdata* d, const char* format, va_list ap);
|
2001-03-13 07:59:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* End of _scanf.h */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-06-04 14:47:21 +00:00
|
|
|
|