diff --git a/Sming/Arch/Esp32/Components/libc/src/include/sys/pgmspace.h b/Sming/Arch/Esp32/Components/libc/src/include/sys/pgmspace.h index a2c3294ebe..3a103d4a86 100644 --- a/Sming/Arch/Esp32/Components/libc/src/include/sys/pgmspace.h +++ b/Sming/Arch/Esp32/Components/libc/src/include/sys/pgmspace.h @@ -63,17 +63,17 @@ extern "C" { #define pgm_read_dword_far(addr) pgm_read_dword(addr) #define pgm_read_float_far(addr) pgm_read_float(addr) -#define memcpy_P(dest, src, num) memcpy(dest, src, num) -#define memcmp_P(a1, b1, len) memcmp(a1, b1, len) -#define strlen_P(a) strlen(a) -#define strcpy_P(dest, src) strcpy(dest, src) -#define strncpy_P(dest, src, size) strncpy(dest, src, size) -#define strcmp_P(a, b) strcmp(a, b) +#define memcpy_P(dest, src_P, num) memcpy(dest, src_P, num) +#define memcmp_P(buf1, buf2_P, len) memcmp(buf1, buf2_P, len) +#define strlen_P(str_P) strlen(str_P) +#define strcpy_P(dest, src_P) strcpy(dest, src_P) +#define strncpy_P(dest, src_P, size) strncpy(dest, src_P, size) +#define strcmp_P(str1, str2_P) strcmp(str1, str2_P) #define strncmp_P(str1, str2_P, size) strncmp(str1, str2_P, size) -#define strcasecmp_P(a, b) strcasecmp(a, b) -#define strcat_P(dest, src) strcat(dest, src) -#define strstr_P(a, b) strstr(a, b) -#define sprintf_P(s, f, ...) m_snprintf(s, 1024, f, ##__VA_ARGS__) +#define strcasecmp_P(str1, str2_P) strcasecmp(str1, str2_P) +#define strcat_P(dest, src_P) strcat(dest, src_P) +#define strstr_P(haystack, needle_P) strstr(haystack, needle_P) +#define sprintf_P(str, format_P, ...) m_snprintf(str, 1024, format_P, ##__VA_ARGS__) #ifdef __cplusplus } diff --git a/Sming/Arch/Esp8266/Components/libc/include/sys/pgmspace.h b/Sming/Arch/Esp8266/Components/libc/include/sys/pgmspace.h index 42a23c0b1b..0d348681b5 100644 --- a/Sming/Arch/Esp8266/Components/libc/include/sys/pgmspace.h +++ b/Sming/Arch/Esp8266/Components/libc/include/sys/pgmspace.h @@ -153,16 +153,16 @@ static inline uint16_t pgm_read_word_inlined(const void* addr) * @{ */ -void* memcpy_P(void* dest, const void* src_P, size_t length); -int memcmp_P(const void* a1, const void* b1, size_t len); -size_t strlen_P(const char* src_P); -char* strcpy_P(char* dest, const char* src_P); -char* strncpy_P(char* dest, const char* src_P, size_t size); -int strcmp_P(const char* str1, const char* str2_P); -int strncmp_P(const char* str1, const char* str2_P, const size_t size); -int strcasecmp_P(const char* str1, const char* str2_P); -char* strcat_P(char* dest, const char* src_P); -char* strstr_P(char* haystack, const char* needle_P); +void* memcpy_P(void* dest, PGM_VOID_P src_P, size_t length); +int memcmp_P(const void* buf1, PGM_VOID_P buf2_P, size_t len); +size_t strlen_P(PGM_VOID_P src_P); +char* strcpy_P(char* dest, PGM_P src_P); +char* strncpy_P(char* dest, PGM_P src_P, size_t size); +int strcmp_P(const char* str1, PGM_P str2_P); +int strncmp_P(const char* str1, PGM_P str2_P, const size_t size); +int strcasecmp_P(const char* str1, PGM_P str2_P); +char* strcat_P(char* dest, PGM_P src_P); +char* strstr_P(char* haystack, PGM_P needle_P); #define sprintf_P(s, f_P, ...) \ (__extension__({ \ diff --git a/Sming/Arch/Host/Components/libc/include/sys/pgmspace.h b/Sming/Arch/Host/Components/libc/include/sys/pgmspace.h index e97595d139..3d1917db5c 100644 --- a/Sming/Arch/Host/Components/libc/include/sys/pgmspace.h +++ b/Sming/Arch/Host/Components/libc/include/sys/pgmspace.h @@ -39,17 +39,17 @@ bool isFlashPtr(const void* ptr); #define pgm_read_dword_far(addr) pgm_read_dword(addr) #define pgm_read_float_far(addr) pgm_read_float(addr) -#define memcpy_P(dest, src, num) memcpy(dest, src, num) -#define memcmp_P(a1, b1, len) memcmp(a1, b1, len) -#define strlen_P(a) strlen(a) -#define strcpy_P(dest, src) strcpy(dest, src) -#define strncpy_P(dest, src, size) strncpy(dest, src, size) -#define strcmp_P(a, b) strcmp(a, b) +#define memcpy_P(dest, src_P, num) memcpy(dest, src_P, num) +#define memcmp_P(buf1, buf2_P, len) memcmp(buf1, buf2_P, len) +#define strlen_P(str_P) strlen(str_P) +#define strcpy_P(dest, src_P) strcpy(dest, src_P) +#define strncpy_P(dest, src_P, size) strncpy(dest, src_P, size) +#define strcmp_P(str1, str2_P) strcmp(str1, str2_P) #define strncmp_P(str1, str2_P, size) strncmp(str1, str2_P, size) -#define strcasecmp_P(a, b) strcasecmp(a, b) -#define strcat_P(dest, src) strcat(dest, src) -#define strstr_P(a, b) strstr(a, b) -#define sprintf_P(s, f, ...) m_snprintf(s, 1024, f, ##__VA_ARGS__) +#define strcasecmp_P(str1, str2_P) strcasecmp(str1, str2_P) +#define strcat_P(dest, src_P) strcat(dest, src_P) +#define strstr_P(haystack, needle_P) strstr(haystack, needle_P) +#define sprintf_P(str, format_P, ...) m_snprintf(str, 1024, format_P, ##__VA_ARGS__) #ifdef __cplusplus } diff --git a/Sming/Arch/Rp2040/Components/libc/src/include/sys/pgmspace.h b/Sming/Arch/Rp2040/Components/libc/src/include/sys/pgmspace.h index 676e70fec6..a04deaa0c9 100644 --- a/Sming/Arch/Rp2040/Components/libc/src/include/sys/pgmspace.h +++ b/Sming/Arch/Rp2040/Components/libc/src/include/sys/pgmspace.h @@ -63,17 +63,17 @@ extern "C" { #define pgm_read_dword_far(addr) pgm_read_dword(addr) #define pgm_read_float_far(addr) pgm_read_float(addr) -#define memcpy_P(dest, src, num) memcpy(dest, src, num) -#define memcmp_P(a1, b1, len) memcmp(a1, b1, len) -#define strlen_P(a) strlen(a) -#define strcpy_P(dest, src) strcpy(dest, src) -#define strncpy_P(dest, src, size) strncpy(dest, src, size) -#define strcmp_P(a, b) strcmp(a, b) +#define memcpy_P(dest, src_P, num) memcpy(dest, src_P, num) +#define memcmp_P(buf1, buf2_P, len) memcmp(buf1, buf2_P, len) +#define strlen_P(str_P) strlen(str_P) +#define strcpy_P(dest, src_P) strcpy(dest, src_P) +#define strncpy_P(dest, src_P, size) strncpy(dest, src_P, size) +#define strcmp_P(str1, str2_P) strcmp(str1, str2_P) #define strncmp_P(str1, str2_P, size) strncmp(str1, str2_P, size) -#define strcasecmp_P(a, b) strcasecmp(a, b) -#define strcat_P(dest, src) strcat(dest, src) -#define strstr_P(a, b) strstr(a, b) -#define sprintf_P(s, f, ...) m_snprintf(s, 1024, f, ##__VA_ARGS__) +#define strcasecmp_P(str1, str2_P) strcasecmp(str1, str2_P) +#define strcat_P(dest, src_P) strcat(dest, src_P) +#define strstr_P(haystack, needle_P) strstr(haystack, needle_P) +#define sprintf_P(str, format_P, ...) m_snprintf(str, 1024, format_P, ##__VA_ARGS__) #ifdef __cplusplus } diff --git a/Sming/Components/FlashString b/Sming/Components/FlashString index d9a0a50e4d..d7a129d6a6 160000 --- a/Sming/Components/FlashString +++ b/Sming/Components/FlashString @@ -1 +1 @@ -Subproject commit d9a0a50e4d91f0d7ba68166cae6e0d52ac474453 +Subproject commit d7a129d6a6b2f3e8e9b90b143556fdcb8587e77f