mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-25 10:08:28 -04:00
desktop: more progmem string functions
This commit is contained in:
parent
f22988163e
commit
d658bc6f9d
@ -27,6 +27,7 @@ extern "C" {
|
|||||||
typedef char PROGMEM prog_char;
|
typedef char PROGMEM prog_char;
|
||||||
extern int strcasecmp_P(const char *, PGM_P) __ATTR_PURE__;
|
extern int strcasecmp_P(const char *, PGM_P) __ATTR_PURE__;
|
||||||
extern int strcmp_P(const char *, PGM_P) __ATTR_PURE__;
|
extern int strcmp_P(const char *, PGM_P) __ATTR_PURE__;
|
||||||
|
extern int strncmp_P(const char *, PGM_P, size_t n) __ATTR_PURE__;
|
||||||
extern size_t strlcat_P (char *, PGM_P, size_t );
|
extern size_t strlcat_P (char *, PGM_P, size_t );
|
||||||
extern size_t strnlen_P (PGM_P, size_t );
|
extern size_t strnlen_P (PGM_P, size_t );
|
||||||
extern size_t strlen_P (PGM_P);
|
extern size_t strlen_P (PGM_P);
|
||||||
|
@ -87,6 +87,16 @@ int strcmp_P(PGM_P str1, PGM_P str2)
|
|||||||
return strcmp(str1, str2);
|
return strcmp(str1, str2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int strncmp_P(PGM_P str1, PGM_P str2, size_t n)
|
||||||
|
{
|
||||||
|
return strncmp(str1, str2, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *strncpy_P(char *dest, PGM_P src, size_t n)
|
||||||
|
{
|
||||||
|
return strncpy(dest, src, n);
|
||||||
|
}
|
||||||
|
|
||||||
void *memcpy_P(void *dest, PGM_P src, size_t n)
|
void *memcpy_P(void *dest, PGM_P src, size_t n)
|
||||||
{
|
{
|
||||||
return memcpy(dest, src, n);
|
return memcpy(dest, src, n);
|
||||||
|
Loading…
Reference in New Issue
Block a user