1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-27 21:16:50 +03:00

add includes for <stddef.h> <stdarg.h> <stdio.h> to Arduino.h

add strtok
This commit is contained in:
Markus Sattler 2015-04-17 12:19:58 +02:00
parent 6cf87708c5
commit b6ea1e45af
2 changed files with 12 additions and 3 deletions

View File

@ -20,18 +20,23 @@
#ifndef Arduino_h #ifndef Arduino_h
#define Arduino_h #define Arduino_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "binary.h" #include "binary.h"
#include "pgmspace.h" #include "pgmspace.h"
#ifdef __cplusplus
extern "C" {
#endif
void yield(void); void yield(void);

View File

@ -159,6 +159,10 @@ char* ICACHE_FLASH_ATTR strncat(char * dest, const char * src, size_t n) {
return dest; return dest;
} }
char* ICACHE_FLASH_ATTR strtok(char * str, const char * delimiters) {
return strtok_r(str, delimiters, NULL);
}
char* ICACHE_FLASH_ATTR strtok_r(char * str, const char * delimiters, char ** temp) { char* ICACHE_FLASH_ATTR strtok_r(char * str, const char * delimiters, char ** temp) {
static char * ret = NULL; static char * ret = NULL;
char * start = NULL; char * start = NULL;