25 #ifndef __ESP_LIBC_H__
26 #define __ESP_LIBC_H__
32 char *strcpy(
char *dst,
const char *src);
33 char *strncpy(
char *dst,
const char *src,
size_t n);
34 int strcmp(
const char *s1,
const char *s2);
35 int strncmp(
const char *s1,
const char *s2,
size_t n);
36 size_t strlen(
const char *s);
37 char *strstr(
const char *s1,
const char *s2);
38 char *strcat(
char *dst,
const char *src);
39 char *strncat(
char *dst,
const char *src,
size_t count);
40 size_t strspn(
const char *s,
const char *accept);
41 size_t strcspn(
const char *s,
const char *reject);
42 char *strtok_r(
char *s,
const char *delim,
char **ptrptr);
43 char *strtok(
char *s,
const char *delim);
44 char *strrchr(
const char *s,
int c);
45 char *strdup(
const char *s);
46 char *strchr(
const char *s,
int c);
47 long strtol(
const char *str,
char **endptr,
int base);
49 void bzero(
void *s,
size_t n);
51 void *memcpy(
void *dst,
const void *src,
size_t n);
52 void *memset(
void *dst,
int c,
size_t n);
53 int memcmp(
const void *m1,
const void *m2,
size_t n);
54 void *memmove(
void *dst,
const void *src,
size_t n);
58 int printf(
const char *format, ...);
59 int sprintf(
char *out,
const char *format, ...);
60 int snprintf(
char *buf,
unsigned int count,
const char *format, ...);
61 int puts(
const char *str);
63 void *malloc(
size_t n);
65 void *calloc(
size_t c,
size_t n);
66 void *zalloc(
size_t n);
67 void *realloc(
void *p,
size_t n);
69 int atoi(
const char *s);
70 long atol(
const char *s);
72 unsigned long os_random(
void);
73 int os_get_random(
unsigned char *buf,
size_t len);
76 #define os_printf(fmt, ...) do { \
77 static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = fmt; \
78 printf(flash_str, ##__VA_ARGS__); \