]> git.sur5r.net Git - cc65/blob - libsrc/common/_scanf.h
Added an IRQ vector
[cc65] / libsrc / common / _scanf.h
1 /*
2  * _scanf.h
3  *
4  * (C) Copyright 2001 Ullrich von Bassewitz (uz@cc65.org)
5  *
6  */
7
8
9
10 #ifndef __SCANF_H
11 #define __SCANF_H
12
13
14
15 /* Forward */
16 struct indesc;
17
18 /* Type of the function that is called to input data. The function will
19  * return EOF if no more data is available.
20  */
21 typedef char (*infunc) (struct indesc* desc);
22
23
24
25 /* Control structure passed to the low level worker function.
26  * Beware: The low level functions will access the structure on the assembly
27  * level, so check this when altering the structure.
28  */
29 struct indesc {
30     infunc          fin;        /* Pointer to input routine */
31     unsigned        ccount;     /* Number of chars read */
32
33     /* Fields used outside from _scanf */
34     char*           buf;        /* Pointer to input buffer */
35     unsigned        size;       /* Size of input buffer */
36     unsigned        fill;       /* Fill mark of input buffer */
37     unsigned        ridx;       /* Read index of input buffer */
38 };
39
40
41
42 /* Internal scanning routine */
43 int _scanf (struct indesc* d, const char* format, va_list ap);
44
45
46
47 /* End of _scanf.h */
48 #endif
49
50
51
52