]> git.sur5r.net Git - cc65/blob - libsrc/common/_scanf.h
6634c75e79bfe06bc2d292ab39470a0010c3365f
[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 */
19 typedef void (*infunc) (struct indesc* desc, const char* buf, unsigned count);
20
21
22
23 /* Control structure passed to the low level worker function.
24  * Beware: The low level functions will access the structure on the assembly
25  * level, so check this when altering the structure.
26  */
27 struct indesc {
28     char*       buf;            /* Pointer to input buffer */
29     unsigned    size;           /* Size of input buffer */
30     unsigned    fill;           /* Fill mark of input buffer */
31     unsigned    ridx;           /* Read index of input buffer */
32     infunc      fin;            /* Pointer to input routine */
33 };
34
35
36
37 /* Internal scanning routine */
38 int _scanf (struct indesc* d, const char* format, va_list ap);
39
40
41
42 /* End of _scanf.h */
43 #endif
44
45
46