summaryrefslogtreecommitdiff
path: root/firmware/libc/sscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/libc/sscanf.c')
-rw-r--r--firmware/libc/sscanf.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/firmware/libc/sscanf.c b/firmware/libc/sscanf.c
index 5fbe81f3e0..5bb08d8268 100644
--- a/firmware/libc/sscanf.c
+++ b/firmware/libc/sscanf.c
@@ -1,22 +1,7 @@
1#include <stdarg.h> 1#include <stdarg.h>
2#include <string.h> 2#include <string.h>
3#include <stdbool.h> 3#include <stdbool.h>
4 4#include <ctype.h>
5static inline bool isspace(char c)
6{
7 return (c == ' ') || (c == '\t') || (c == '\n');
8}
9
10static inline bool isdigit(char c)
11{
12 return (c >= '0') && (c <= '9');
13}
14
15static inline bool isxdigit(char c)
16{
17 return ((c >= '0') && (c <= '9'))
18 || ((c >= 'a') && (c <= 'f')) || ((c >= 'A') && (c <= 'F'));
19}
20 5
21static int parse_dec(int (*peek)(void *userp), 6static int parse_dec(int (*peek)(void *userp),
22 void (*pop)(void *userp), 7 void (*pop)(void *userp),