]> git.sur5r.net Git - cc65/blob - libsrc/common/sscanf.c
Remove va_fix
[cc65] / libsrc / common / sscanf.c
1 /*
2  * sscanf.c
3  *
4  * (C) Copyright 2001 Ullrich von Bassewitz (uz@cc65.org)
5  *
6  */
7
8
9
10 #include <stdio.h>
11 #include <string.h>
12 #include "_scanf.h"
13
14
15
16 /*****************************************************************************/
17 /*                                   Code                                    */
18 /*****************************************************************************/
19
20
21
22 int sscanf (const char* str, const char* format, ...)
23 /* Standard C function */
24 {
25     struct indesc id;
26     va_list ap;
27
28     /* Initialize the indesc struct. We leave all fields uninitialized that we
29      * don't need
30      */
31     id.buf  = (char*) str;
32     id.fill = strlen (str);
33
34     /* Setup for variable arguments */
35     va_start (ap, format);
36
37     /* Call the internal function. Since we know that va_end won't do anything,
38      * we will save the call and return the value directly.
39      */
40     return _scanf (&id, format, ap);
41 }
42
43
44