aa4ea83798924bf66c40d72e7fa22ec06b85cd41
6 #include <ndk/umtypes.h>
7 #include <ndk/rtlfuncs.h>
12 /* helper function for *scanf. Returns the value of character c in the
13 * given base, or -1 if the given character is not a digit of the base.
15 static int char2digit(char c
, int base
) {
16 if ((c
>='0') && (c
<='9') && (c
<='0'+base
-1)) return (c
-'0');
17 if (base
<=10) return -1;
18 if ((c
>='A') && (c
<='Z') && (c
<='A'+base
-11)) return (c
-'A'+10);
19 if ((c
>='a') && (c
<='z') && (c
<='a'+base
-11)) return (c
-'a'+10);
29 int sscanf(const char *str
, const char *format
, ...)
34 va_start(valist
, format
);
35 res
= vsscanf(str
, format
, valist
);