26
26
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
27
POSSIBILITY OF SUCH DAMAGE. */
29
/* $Id: pgmspace.h,v 1.26.2.3 2006/02/28 16:53:57 aesok Exp $ */
29
/* $Id: pgmspace.h,v 1.26.2.8 2007/03/31 23:17:23 dmix Exp $ */
37
37
Wolfgang Haidinger <wh@vmars.tuwien.ac.at> (pgm_read_dword())
40
/** \defgroup avr_pgmspace <avr/pgmspace.h>: Program Space String Utilities
41
/** \defgroup avr_pgmspace <avr/pgmspace.h>: Program Space Utilities
42
43
#include <avr/io.h>
43
44
#include <avr/pgmspace.h>
210
217
typedef uint16_t prog_uint16_t PROGMEM;
211
218
typedef int32_t prog_int32_t PROGMEM;
212
219
typedef uint32_t prog_uint32_t PROGMEM;
213
221
typedef int64_t prog_int64_t PROGMEM;
214
222
typedef uint64_t prog_uint64_t PROGMEM;
215
224
#endif /* defined(__DOXYGEN__) */
217
226
/* Although in C, we can get away with just using __c, it does not work in
603
612
#define PGM_VOID_P const prog_void *
615
extern PGM_VOID_P memchr_P(PGM_VOID_P s, int val, size_t len) __ATTR_CONST__;
616
extern int memcmp_P(const void *, PGM_VOID_P, size_t) __ATTR_PURE__;
606
617
extern void *memcpy_P(void *, PGM_VOID_P, size_t);
618
extern void *memmem_P(const void *, size_t, PGM_VOID_P, size_t) __ATTR_PURE__;
619
extern PGM_VOID_P memrchr_P(PGM_VOID_P s, int val, size_t len) __ATTR_CONST__;
607
620
extern char *strcat_P(char *, PGM_P);
621
extern PGM_P strchr_P(PGM_P s, int val) __ATTR_CONST__;
622
extern PGM_P strchrnul_P(PGM_P s, int val) __ATTR_CONST__;
608
623
extern int strcmp_P(const char *, PGM_P) __ATTR_PURE__;
609
624
extern char *strcpy_P(char *, PGM_P);
610
625
extern int strcasecmp_P(const char *, PGM_P) __ATTR_PURE__;
626
extern char *strcasestr_P(const char *, PGM_P) __ATTR_PURE__;
627
extern size_t strcspn_P(const char *s, PGM_P reject) __ATTR_PURE__;
611
628
extern size_t strlcat_P (char *, PGM_P, size_t );
612
629
extern size_t strlcpy_P (char *, PGM_P, size_t );
613
630
extern size_t strlen_P(PGM_P) __ATTR_CONST__; /* program memory can't change */
616
633
extern int strncasecmp_P(const char *, PGM_P, size_t) __ATTR_PURE__;
617
634
extern char *strncat_P(char *, PGM_P, size_t);
618
635
extern char *strncpy_P(char *, PGM_P, size_t);
636
extern char *strpbrk_P(const char *s, PGM_P accept) __ATTR_PURE__;
637
extern PGM_P strrchr_P(PGM_P s, int val) __ATTR_CONST__;
638
extern char *strsep_P(char **sp, PGM_P delim);
639
extern size_t strspn_P(const char *s, PGM_P accept) __ATTR_PURE__;
619
640
extern char *strstr_P(const char *, PGM_P) __ATTR_PURE__;
621
642
#ifdef __cplusplus