4 * (C) Copyright 2001 Ullrich von Bassewitz (uz@cc65.org)
16 /*****************************************************************************/
18 /*****************************************************************************/
22 static char get (struct indesc* d)
23 /* Read a character from the input string and return it */
26 if (C = d->buf[d->ridx]) {
27 /* Increment index only if end not reached */
35 int sscanf (const char* str, const char* format, ...)
36 /* Standard C function */
41 /* Initialize the indesc struct. We leave all fields uninitialized that we
44 id.fin = (infunc) get;
48 /* Setup for variable arguments */
49 va_start (ap, format);
51 /* Call the internal function. Since we know that va_end won't do anything,
52 * we will save the call and return the value directly.
54 return _scanf (&id, format, ap);